UNPKG

@adonis-agora/authkit-react

Version:

Frontend ergonomics over AuthKit for AdonisJS + Inertia + React apps: a typed useAuth() hook, role-gating hooks and gating components.

18 lines (17 loc) 611 B
export function interactionUrls(uid, basePath = '/auth/interaction') { const base = `${basePath}/${uid}`; return { identifier: `${base}/identifier`, login: `${base}/login`, magic: `${base}/magic`, signup: `${base}/signup`, switch: `${base}/switch`, passkeyOptions: `${base}/passkey/options`, passkeyVerify: `${base}/passkey/verify`, otpVerify: `${base}/otp-verify`, }; } export const OTP_CODE_FIELD = 'code'; export function oauthRedirectUrl(provider, uid, basePath = '/auth') { return `${basePath}/${provider}/redirect/${uid}`; }