Skip to content
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

Add Magic link login #3246

Merged
merged 15 commits into from
Aug 30, 2024
Merged

Add Magic link login #3246

merged 15 commits into from
Aug 30, 2024

Conversation

codebykat
Copy link
Member

@codebykat codebykat commented Aug 16, 2024

Fix

Adds the option to login via a link or code to the Electron apps.

Screenshot 2024-08-27 at 12 17 37 PM Screenshot 2024-08-27 at 12 20 00 PM

Test

  1. You should download a build from this PR to test with. (In the build artifacts)
  2. Enter a valid account email.
  3. You should get the code or link via email
  4. Entering the code should work (Clicking the link was tested on the GAE PR already)
  5. Try ALL the other things on the sign in form: password entry, creating an account, etc. Should still work!

Release

Added the option to log in via "magic" link or code.

@codebykat codebykat self-assigned this Aug 16, 2024
@roundhill
Copy link
Contributor

We might need to make sure we're sending Access-Control-Allow-Origin from the new endpoints?

@roundhill roundhill marked this pull request as ready for review August 27, 2024 19:50
@roundhill roundhill changed the title [WIP] Add: Magic link login Add Magic link login Aug 27, 2024

contextBridge.exposeInMainWorld('electron', electronAPI);

module.exports = {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needed to change this to module.exports to avoid a fatal

Copy link

@jleandroperez jleandroperez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Logging in with Username + PW works
✅ Logging in with Username + Code works
⚠️ Code text field isn't the first responder
✅ Logging in with Username + Magic Link
✅ Quit after Sign In works well

Works exactly as advertised Dan!!

:shipit:

this.setState({ authStatus: 'submitting' }, async () => {
try {
const response = await fetch(
'https://app.simplenote.com/account/request-login',

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it a regular practise to leave URLs like this one?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ehh probably not, I'll see if there's some globals or a config or something!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other urls were just hard code like that so I left these in!

@roundhill
Copy link
Contributor

⚠️ Code text field isn't the first responder

All sorted! Thanks @jleandroperez

@roundhill roundhill merged commit 6b154e9 into trunk Aug 30, 2024
7 checks passed
@roundhill roundhill deleted the add/magic-link branch August 30, 2024 22:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants