Skip to main content

Interface.IAuthService

Authentication service.

See

IKeybanApi

Properties

PropertyTypeDescription
getUser() => Promise< | { birthDate?: string | null; createdAt: string; email: string; emailVerified: boolean; id: string; image?: string | null; name: string; phoneNumber?: string | null; phoneNumberVerified?: boolean | null; updatedAt: string; } | null>Retrieves the authenticated user profile, or null.
isAuthenticated() => Promise<boolean>Checks whether the current user is authenticated.
sendOtp(args: AuthSendOtpArgs) => Promise<void>Sends an OTP to email or phone.
signIn(args: AuthSignInArgs) => Promise<{ birthDate?: string | null; createdAt: string; email: string; emailVerified: boolean; id: string; image?: string | null; name: string; phoneNumber?: string | null; phoneNumberVerified?: boolean | null; updatedAt: string; }>Signs in a user using password or OTP.
signOut() => Promise<void>Signs out the current user.
signUp(args: AuthSignUpArgs) => Promise<{ birthDate?: string | null; createdAt: string; email: string; emailVerified: boolean; id: string; image?: string | null; name: string; phoneNumber?: string | null; phoneNumberVerified?: boolean | null; updatedAt: string; }>Registers a new user account.
updateUser(args: AuthUpdateUserArgs) => Promise<{ birthDate?: string | null; createdAt: string; email: string; emailVerified: boolean; id: string; image?: string | null; name: string; phoneNumber?: string | null; phoneNumberVerified?: boolean | null; updatedAt: string; }>Updates the user profile.