-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
feat: add dev auto login #20622
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
feat: add dev auto login #20622
Conversation
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
|
|
||
| // Try dev auto-login first | ||
| const isDevelopment = process.env.NODE_ENV === 'development'; | ||
| const autoLoginPassword = process.env.MM_DEV_AUTO_LOGIN_PASSWORD; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wondering if we would want to reuse the already password env variable that it's defined!
This is something really cool! I will scheduled a 15 minute meeting around this, because maybe this is useful to save time on our e2e pipelines <3
|
|
This PR has been automatically marked as stale because it has not had recent activity in the last 90 days. It will be closed in 7 days. Thank you for your contributions. |


Description
Problem
Developers must manually enter their wallet password every time they restart the app during development, which slows down the development workflow. This repetitive task becomes particularly tedious when testing features that require frequent app restarts or when switching between different testing scenarios. The current authentication flow doesn't provide any shortcuts for development environments.
Solution
Added a development-only auto-login feature that reads a password from the
MM_DEV_AUTO_LOGIN_PASSWORDenvironment variable and automatically authenticates the user on app launch. The feature includes proper error handling to fall back to the normal login flow if auto-login fails. Developers can now configure their password once in.js.envand bypass the login screen, significantly speeding up the development cycle.Changelog
CHANGELOG entry: null
Related issues
Fixes:
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Adds dev-only auto-login using MM_DEV_AUTO_LOGIN_PASSWORD, updates auth flow, tests, and env example.
app/components/Nav/App/App.tsx):NODE_ENV=developmentandMM_DEV_AUTO_LOGIN_PASSWORDis set, callsAuthentication.userEntryAuthwith password andcurrentAuthTypeofpassword, then navigates toRoutes.ONBOARDING.HOME_NAV; falls back to normal auth on failure.AuthDataandAUTHENTICATION_TYPEto support the new path.app/components/Nav/App/App.test.tsx):Authentication.userEntryAuthand adds tests to ensure auto-login is skipped in production and when no password is set; includes a skipped test for successful auto-login..js.env.example):MM_DEV_AUTO_LOGIN_PASSWORD(development only) with documentation comments.Written by Cursor Bugbot for commit 247bbea. This will update automatically on new commits. Configure here.