Loading...
Loading...
Compare original and translation side by side
emailAndPasswordsocialProviderscreateAuthClientsignUp.emailsignIn.emailsignIn.socialsignOutimport { betterAuth } from "better-auth";
export const auth = betterAuth({
emailAndPassword: { enabled: true },
socialProviders: {
github: {
clientId: process.env.GITHUB_CLIENT_ID as string,
clientSecret: process.env.GITHUB_CLIENT_SECRET as string,
},
},
});import { createAuthClient } from "better-auth/client";
const authClient = createAuthClient();
await authClient.signUp.email({
email,
password,
name,
});
await authClient.signIn.email({
email,
password,
callbackURL: "/dashboard",
});
await authClient.signIn.social({
provider: "github",
callbackURL: "/dashboard",
});
await authClient.signOut();emailAndPasswordsocialProviderscreateAuthClientsignUp.emailsignIn.emailsignIn.socialsignOutimport { betterAuth } from "better-auth";
export const auth = betterAuth({
emailAndPassword: { enabled: true },
socialProviders: {
github: {
clientId: process.env.GITHUB_CLIENT_ID as string,
clientSecret: process.env.GITHUB_CLIENT_SECRET as string,
},
},
});import { createAuthClient } from "better-auth/client";
const authClient = createAuthClient();
await authClient.signUp.email({
email,
password,
name,
});
await authClient.signIn.email({
email,
password,
callbackURL: "/dashboard",
});
await authClient.signIn.social({
provider: "github",
callbackURL: "/dashboard",
});
await authClient.signOut();emailVerification.sendVerificationEmailemailAndPassword.requireEmailVerificationemailVerification.sendVerificationEmailemailAndPassword.requireEmailVerificationsocialProviderssignIn.socialcallbackURLerrorCallbackURLnewUserCallbackURLsocialProviderssignIn.socialcallbackURLerrorCallbackURLnewUserCallbackURLrememberMerememberMetoolchains/platforms/auth/better-auth/better-auth-authentication/references/email-password.mdtoolchains/platforms/auth/better-auth/better-auth-authentication/references/providers.mdtoolchains/platforms/auth/better-auth/better-auth-authentication/references/email-password.mdtoolchains/platforms/auth/better-auth/better-auth-authentication/references/providers.md