Repository navigation
Sign in by a code or a link to codegrave.com - #49
Merged
Merged
Conversation
The sign-in email's link pointed at the sign-in service's own address. The page now takes the code from the email, and trades a one-time key left after '#' by a link to codegrave.com for a session, so the email template can send either without the service's address. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MCuMSfetGcKCVLNDJsJfC8
✅ Deploy Preview for ubiquitous-smakager-593fec ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
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.
Requested by Shrawan · project thread
What this changes
#(#token_hash=…&type=email) is traded for a session when the page loads.docs/ACCOUNTS.mdgives the email template to set in the sign-in service's dashboard so the email links to codegrave.com and shows the code.Why
The sign-in email's link pointed at the sign-in service's own address, not codegrave.com. Careful readers and browser agents refuse to open a link like that. With this change the email can link to codegrave.com or carry only a code. The key sits after
#, so it never reaches a server, and a mail scanner that fetches the link cannot use it up.The dashboard template is not changed by this PR. Until someone changes it, sign-in works exactly as before.
Kind
site/)Sources
Screenshots
The "Check your inbox" dialog with the code field (phone):
signin-code/code-390.pngandcode-1440.pngin the project files.Local link to see it:
/→ Sign in → enter an email.Checklist
node scripts/build.mjs --checkprints0 errorsnode --testpassesidof an existing entry or viewLICENSE(MIT for code, CC BY-NC-SA 4.0 for content)Tested in Playwright with the sign-in service mocked: a typed code calls verify with the email and code, and a
#token_hashlink signs in and clears the address. Not tested against the live service.Generated by Claude Code