add basic db schema + auth + oauth with osu
This commit is contained in:
@@ -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
|
||||
}
|
||||
});
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user