Authentication
Overview
Ship Mobile Fast comes with pre-built authentication flows using Expo’s SecureStore and your choice of authentication providers.
Features
Email/Password
Users can sign in with their email and password.
Social OAuth
We have Google and Apple OAuth support.
Magic Link
Sending a magic link to the user’s email address
Forgot Password
If your users forget their password, they can reset it.
Verify Email
Users can verify their email address in the app.
How to use?
Currently implemented and fully supported.
Auth Functions
Props
Value | Type | Description | |
---|---|---|---|
user | UserMetaData | null | Contains current authenticated user information | |
session | Session | null | Contains active session information | |
initialized | boolean | Indicates if auth state has been initialized | |
signOut | () => Promise<void> | Signs out the current user | |
signIn | (email: string, password: string) => Promise<void> | Signs in user with email/password | |
signUp | (email: string, password: string) => Promise<void> | Creates a new user account | |
sendMagicLink | (email: string) => Promise<void> | Sends a magic link to user’s email | |
signInWithGoogle | () => Promise<void> | Initiates Google OAuth sign in | |
signInWithApple | () => Promise<void> | Initiates Apple OAuth sign in | |
createSessionFromUrl | (url: string) => Promise<void> | Creates session from URL | |
handleShowPassword | () => void | Toggles password visibility | |
isLoading | boolean | Indicates if auth operation is in progress | |
error | Error | null | Contains error information if any | |
isAuthenticated | boolean | Indicates if user is authenticated | |
showPassword | boolean | Controls password visibility state | |
handleError | `(error: AuthError | Error) => void` | Handles auth-related errors |
sendNewPasswordLink | (email: string) => Promise<void> | Sends password reset link | |
setNewPassword | (password: string) => Promise<void> | Sets new password |
Was this page helpful?