add basic db schema + auth + oauth with osu

This commit is contained in:
2026-02-28 01:00:22 +01:00
parent 844fd590e1
commit 0a6695fc26
4 changed files with 216 additions and 18 deletions

View File

@@ -60,12 +60,12 @@ export const actions: Actions = {
},
signInSocial: async (event) => {
const formData = await event.request.formData();
const provider = formData.get('provider')?.toString() ?? 'github';
const provider = formData.get('provider')?.toString() ?? 'osu';
const callbackURL = formData.get('callbackURL')?.toString() ?? '/demo/better-auth';
const result = await auth.api.signInSocial({
body: {
provider: provider as 'github',
provider: provider as 'osu',
callbackURL
}
});

View File

@@ -43,9 +43,9 @@
<hr class="my-4" />
<form method="post" action="?/signInSocial" use:enhance>
<input type="hidden" name="provider" value="github" />
<input type="hidden" name="provider" value="osu" />
<input type="hidden" name="callbackURL" value="/demo/better-auth" />
<button class="rounded-md bg-blue-600 px-4 py-2 text-white transition hover:bg-blue-700"
>Sign in with GitHub</button
>Sign in with osu!</button
>
</form>