feat: add login link functionality with token generation and validation

This commit is contained in:
Rotimi Best
2026-03-13 05:24:47 +01:00
parent 1d378fa5ff
commit 50252c2327
4 changed files with 190 additions and 0 deletions
+2
View File
@@ -9,6 +9,7 @@ import { createProfileHook } from './auth/hooks/create-profile';
import { db } from '@db/drizzle';
import { drizzleAdapter } from 'better-auth/adapters/drizzle';
import { config as emailAndPassword } from './auth/email-password';
import { loginLink } from './auth/plugins/login-link';
import { sso } from '@better-auth/sso';
import { syncUserWithProfile } from './auth/hooks/sync-user';
import { tokenExchange } from './auth/plugins/token-exchange';
@@ -83,6 +84,7 @@ export const auth: ReturnType<typeof betterAuth> = betterAuth({
// OIDC providers are registered dynamically per organization
// via the admin API (auth.api.registerSSOProvider)
}),
loginLink(),
tokenExchange()
]
});