This is a pretty far-developed starting point. Authentication has been intialized with Better-Auth, a database has been setup with Prisma, and Google + email logins have been enabled, as well as Google + Email registration.
9 lines
221 B
TypeScript
9 lines
221 B
TypeScript
import { createAuthClient } from "better-auth/svelte"
|
|
|
|
export const authClient = createAuthClient({});
|
|
|
|
const signIn = async () => {
|
|
const data = await authClient.signIn.social({
|
|
provider: "google",
|
|
});
|
|
}; |