Sign-In Methods
Magic Code
Email or SMS code-based authentication
SSO
Google, Apple, and Microsoft sign-in
SAML
Enterprise single sign-on
Getting Started
Basic Sign-In Flow
Enter Your Email or Phone Number
On the sign-in page, enter your email address or phone number:
src/pages/signin/LoginForm/BaseLoginForm.tsx
Phone numbers are automatically formatted with your country code.
Receive Your Magic Code
After entering your login, New Expensify will:
- Check if your account exists
- Determine if SAML is required for your domain
- Send a magic code to your email or phone
src/libs/actions/Session/index.ts
Enter the Magic Code
Check your email or SMS for the magic code and enter it to complete sign-in.The validate code form handles:
- Magic code validation
- Two-factor authentication (if enabled)
- Recovery code entry
SSO Authentication
New Expensify supports sign-in with Google and Apple accounts.- Google Sign-In
- Apple Sign-In
- SAML/Enterprise SSO
Google Authentication
Sign in with your Google account for quick access:src/pages/signin/LoginForm/BaseLoginForm.tsx
Google sign-in is available on all platforms and uses the
@react-native-google-signin/google-signin package.- User clicks the Google sign-in button
- Google OAuth flow opens in a browser/modal
- User authenticates with Google
- Google returns an authentication token
- New Expensify validates the token and creates/signs into the account
Two-Factor Authentication (2FA)
Add an extra layer of security to your account with two-factor authentication.Setting Up 2FA
Enable 2FA
- Scan the QR code with your authenticator app (Google Authenticator, Authy, etc.)
- Enter the 6-digit code from your authenticator app
- Save your recovery codes in a safe place
2FA Sign-In Flow
When 2FA is enabled:src/pages/signin/SignInPage.tsx
Recovery Codes
Recovery codes are backup codes that can be used when you don’t have access to your authenticator app:- Each code is single-use
- You receive 10 codes when setting up 2FA
- Store them securely (password manager, printed copy, etc.)
- Generate new codes in your security settings
If you lose both your authenticator app and recovery codes, you’ll need to contact support to regain access to your account.
Session Management
New Expensify manages your session securely with authentication tokens.Session Lifecycle
src/libs/actions/Session/index.ts
authToken: JWT token for API authenticationauthTokenType: Type of auth (normal, anonymous, support)accountID: Your unique account identifieremail: Your email addresscreationDate: When the session was created
Session Expiration
Sessions expire after a period of inactivity:src/libs/actions/Session/index.ts
You’ll be automatically signed out when your session expires. Your work is saved, and you can sign back in to continue.
Signing Out
To sign out of your account:src/libs/actions/Session/index.ts
- Local data is cleared (except specific preserved keys)
- API call invalidates the session token
- You’re redirected to the sign-in page
- For SAML users, the identity provider is also logged out
Security Best Practices
Enable 2FA
Add two-factor authentication for enhanced security
Use Strong Passwords
If using email sign-in, ensure your email has a strong password
Keep Recovery Codes Safe
Store 2FA recovery codes securely
Sign Out on Shared Devices
Always sign out when using shared computers
Troubleshooting
Not Receiving Magic Code
Not Receiving Magic Code
If you’re not receiving your magic code:
- Check your spam/junk folder
- Verify the email address or phone number is correct
- Wait a few minutes and try again
- Check your SMS delivery settings (for phone login)
Magic codes expire after 10 minutes. Request a new code if needed.
Invalid Magic Code Error
Invalid Magic Code Error
If you’re getting an “Invalid code” error:
- Ensure you’re entering the most recent code
- Check for typos
- Request a new code if the current one is expired
- Clear your browser cache and try again
Lost Authenticator Access
Lost Authenticator Access
If you’ve lost access to your authenticator app:
- Use one of your recovery codes to sign in
- Once signed in, disable and re-enable 2FA with a new authenticator
- If you don’t have recovery codes, contact support
SAML Sign-In Issues
SAML Sign-In Issues
If SAML sign-in isn’t working:
- Contact your IT administrator to verify SAML is configured
- Ensure you’re using your work email address
- Check with IT that your account has access to the application
- Try signing in through your identity provider directly
Next Steps
Create a Workspace
Set up your first workspace to start managing expenses
Invite Team Members
Add colleagues to collaborate on expenses
Configure Settings
Customize your account preferences
Security Settings
Manage your 2FA and security options
