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

Magic Link Login #1598

Merged
merged 42 commits into from
Jul 8, 2024
Merged

Magic Link Login #1598

merged 42 commits into from
Jul 8, 2024

Conversation

jleandroperez
Copy link
Contributor

@jleandroperez jleandroperez commented Jun 6, 2024

Details

This PR implements Magic Link Authentication support.

Ref. #1605

Test

  1. Fresh install Simplenote
  2. Press Login > Login with Email
  3. Enter your email + press Instantly Log In with Email
  • Verify that you get an email shortly after
  • Verify that if you click Log In (in your email!), Simpenote logs you in
  • Verify that if you logout, and click on the Log In button again, you won't get logged in

Test: Regressions

  1. Fresh install Simplenote
  2. Press Login with Email
  3. Press on the Continue with Password button
  • Verify that if you enter incorrect credentials, you get an error
  • Verify that the Forgot Password opens the Password Recovery UI in a WebView
  • Verify that if you enter your credentials, Simplenote logs you in

Release

RELEASE-NOTES.txt was updated in e1d5c04 with:

SImplenote now has support for Magic Link Login

@jleandroperez jleandroperez added the enhancement Improve existing functionality. label Jun 6, 2024
@jleandroperez jleandroperez self-assigned this Jun 6, 2024
@wpmobilebot
Copy link
Collaborator

wpmobilebot commented Jun 6, 2024

You can test the changes in simplenote-ios from this Pull Request by:

  • Clicking here or scanning the QR code below to access App Center
  • Then installing the build number pr1598-d5d9526-01907025-717e-4d5a-973a-ccbc76fff9d8 on your iPhone

If you need access to App Center, please ask a maintainer to add you.


- vertical_whitespace
# - vertical_whitespace
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Disabling this, so that we stop chasing whitespaces or extra newlines, all over the place

Copy link
Contributor

Choose a reason for hiding this comment

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

🙇

@jleandroperez jleandroperez changed the title [WIP] Magic Link Login Magic Link Login Jun 14, 2024
@jleandroperez jleandroperez marked this pull request as ready for review June 14, 2024 15:46
@roundhill
Copy link
Contributor

Overall this is looking good, going to wait to approve until we have the email link working (protocol not being stripped in gmail). Nice work Jorge!

@jleandroperez jleandroperez changed the base branch from trunk to lantean/1605-universal-links July 1, 2024 18:19

// MARK: - LoginRemote
//
class LoginRemote: Remote {
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this that different from AccountRemote? for the passkey remote things I dumped them in AccountRemote I don't mind the specifically targeted class, but 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

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

(Belayed reply!!) This one is indeed different from AccountRemote. Account encapsulates Email Verification + Account Deletion.

I'd be super okay with merging them both, though. I'll revisit in a follow-up, TY!!


// MARK: - MagicLinkRequestedView
//
struct MagicLinkRequestedView: View {
Copy link
Contributor

Choose a reason for hiding this comment

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

Currently almost all of the SwiftUI in SNiOS is done with UIKit. The only swiftUI we are using is in the widgets, where it is required. Do we want to start mixing UIKit and SwiftUI?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Discussed over Slack, but leaving a note here, for the record!!

IMHO SwiftUI is all good, as long as it doesn't cause problems. That'd be: perhaps we should just try avoid blending SwiftUI + UIKit in the same UI, because of the (known) layout loops.

TY for bringing this up!!


/// Performs a URLSession Data Task
///
func performDataTask(with request: URLRequest) async throws -> Data {
Copy link
Contributor

Choose a reason for hiding this comment

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

nice

Copy link
Contributor

@charliescheer charliescheer left a comment

Choose a reason for hiding this comment

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

Looks good to me. I sent a few questions that we should ponder, but I'm not convinced that any changes need to happen based on those questions

Base automatically changed from lantean/1605-universal-links to trunk July 2, 2024 21:19
@dangermattic
Copy link
Collaborator

1 Warning
⚠️ PR is not assigned to a milestone.

Generated by 🚫 Danger

@jleandroperez
Copy link
Contributor Author

Thank you Charlie!! We'll need to follow-up this PR, and also allow for Code Verification.

Merging this one!!

@jleandroperez jleandroperez merged commit a679f88 into trunk Jul 8, 2024
11 checks passed
@jleandroperez jleandroperez deleted the add/magic-link-auth branch July 8, 2024 19:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improve existing functionality.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants