{{ message }}
Repository navigation
Mobile-native magic-link and password-reset endpoints - #22077
Open
slick-daddy wants to merge 4 commits into
Open
slick-daddy wants to merge 4 commits into
slick-daddy wants to merge 4 commits into
Conversation
Add POST /auth/magic-link/bearer, POST /password/reset/mobile-send, POST /password/reset/mobile-confirm/:token returning web:mobile OAuth tokens as JSON-friendly plain responses. AI-assisted: built with OpenCode (Muse Spark) from prompt 'create mobile-native signup, password-reset, or magic-link for mobile'; human review and testing still required per AI_POLICY.md.
The mobile-native endpoints mixed plain Result with Fu[Result] in Option.fold defaults; wrap with .toFuccess per codebase convention. Reformat with scalafmtAll.
Master commit 8c3b9e4 renamed the model member without updating app/controllers/Ublog.scala, breaking compilation of this PR's merge. One-line follow-up so CI can build.
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.

Mobile app users can't log in by magic link or reset a password without opening a browser. This PR adds three POST endpoints that hand back
web:mobileOAuth tokens:/auth/magic-link/bearerswaps a magic-link token from the existing/auth/magic-link/sendemail for a token,/password/reset/mobile-sendsends the reset email and always answers 204 so addresses can't be probed, and/password/reset/mobile-confirm/:tokensets the new password and returns a token. Confirm does what the web flow does: rotates the password hash, confirms the email, strips 2FA, closes every session, and drops push subscriptions. All three skip CSRF like the mobile-code endpoints, since app requests carry no Origin header.No Turnstile check, because the app can't render one; abuse protection is the existing email/IP rate limits plus unguessable tokens.
Closed accounts get a 403 rather than the web appeal flow, the token comes back as a bare string like mobile-code/bearer instead of the /api/token JSON shape, and bad or expired tokens all answer 404.
Mobile PR will be introduced later, because we need these endpoints first.
AI Tools: OpenCode + Muse Spark 1.3.