feat: add oidc

This commit is contained in:
David Nguyen
2025-02-14 16:01:16 +11:00
parent 113ab293bb
commit 31de86e425
10 changed files with 443 additions and 254 deletions

View File

@ -257,7 +257,9 @@ export const SignInForm = ({
const onSignInWithGoogleClick = async () => {
try {
await authClient.google.signIn();
await authClient.google.signIn({
redirectPath,
});
} catch (err) {
toast({
title: _(msg`An unknown error occurred`),
@ -271,11 +273,9 @@ export const SignInForm = ({
const onSignInWithOIDCClick = async () => {
try {
// eslint-disable-next-line no-promise-executor-return
await new Promise((resolve) => setTimeout(resolve, 2000));
// await signIn('oidc', {
// callbackUrl,
// });
await authClient.oidc.signIn({
redirectPath,
});
} catch (err) {
toast({
title: _(msg`An unknown error occurred`),