Repository navigation
Conversation
|
All contributors have signed the CLA ✍️ ✅ |
SandPod
force-pushed
the
cursor/passwordless-email-login-edc5
branch
from
October 13, 2026 19:30
fc17247 to
b353403
Compare
…config Moves the sending and logging of verification codes through Serverpod Cloud into serverpod_cloud_code_sender.dart, so that it can be reused for the codes of the passwordless login. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Adds the EmailAccountLoginRequest table for pending login requests and the EmailPasswordlessLoginException returned to clients. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Users can log in with a verification code sent to their email address, without a password (#2100). The first successful login signs up unknown email addresses unless allowSignUp is disabled. EmailIdpConfig gets two optional configuration groups, which can be enabled independently: - password: EmailPasswordLoginConfig, the registration, login and password reset with a password. Enabled by default. - passwordless: EmailPasswordlessLoginConfig, the login with a code. Disabled by default. The existing top-level password settings of EmailIdpConfig keep working as deprecated pass-throughs to the password group. The methods of a disabled login method fail with the unknown reason of their exception. Both login methods use the same EmailAccounts (an account created by a code login has no password) and issue sessions with the email method, so a password reset revokes the sessions of code logins as well. EmailIdp and EmailIdpBaseEndpoint get startPasswordlessLogin and finishPasswordlessLogin, EmailIdpAdmin gets the cleanup of login requests and attempts, and ServerpodCloudEmailIdpConfig can enable the passwordless login with enablePasswordlessLogin. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
EmailSignInWidget takes loginMethods (password, passwordless or both). EmailAuthController handles the passwordless start and verify screens, including the resend cooldown of the server. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Also moves the auth test servers to the password group of EmailIdpConfig. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
SandPod
force-pushed
the
cursor/passwordless-email-login-edc5
branch
from
October 13, 2026 19:38
b353403 to
c7bd7cb
Compare
8 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds passwordless email login: users sign in with a 6-digit code sent to their email address. It is part of the existing email identity provider (
EmailIdp), not a separate provider. The first successful code login signs up unknown addresses unlessallowSignUpisfalse.Fixes #2100
Changes
Server (
serverpod_auth_idp_server)EmailIdpConfighas two optional groups that can be enabled independently:password: EmailPasswordLoginConfig(default on) andpasswordless: EmailPasswordlessLoginConfig(default off). At least one is required. Methods of a disabled login method fail with reasonunknown.EmailIdp/EmailIdpBaseEndpoint: newstartPasswordlessLoginandfinishPasswordlessLogin.EmailIdpAdmin: cleanup of login requests and attempts.EmailAccounts (accounts created this way have an empty password hash) and issue sessions with methodemail, so a password reset also revokes them.ServerpodCloudEmailIdpConfig: newenablePasswordLogin/enablePasswordlessLoginand passwordless options.serverpod_auth_idp_email_account_login_request(migration included).EmailPasswordlessLoginConfig.Flutter (
serverpod_auth_idp_flutter)EmailSignInWidget(loginMethods: EmailLoginMethods.password | passwordless | both). The default ispassword, so existing apps are unchanged.Review notes
Pre-launch Checklist
///), and made sure that the documentation follows the same style as other Serverpod documentation. I checked spelling and grammar.Breaking changes
None for existing configurations. Deprecations and small behaviour changes:
EmailIdpConfig(sendRegistrationVerificationCode,failedLoginRateLimit, …) are deprecated in favour ofpassword: EmailPasswordLoginConfig(...). Passing them still works. Their getters now return nullable values (nullwhen password login is disabled).EmailIdpnow validates its config on creation. For example, asecretHashSaltLengthbelow 8 is rejected at startup instead of failing at the first hash.