import { createUseAuth , AuthProvider , PublicConfig , BaseTokenData , } from "@happykit/auth-email" ; export interface TokenData extends BaseTokenData { } export const publicConfig = { baseUrl : ( ( ) => { if ( process . env . VERCEL_GITHUB_COMMIT_REF === "master" ) return process . env . PRODUCTION_BASE_URL ! ; if ( process . env . NODE_ENV === "production" ) return `https://${ process . env . VERCEL_URL }` ; return "http://localhost:3000" ; } ) ( ) , identityProviders : { } , } ; export { AuthProvider } ; export const useAuth = createUseAuth < TokenData > ( publicConfig ) ; export type Auth = ReturnType < typeof useAuth > ;