Skip to content

refactor: email sign-in opt-in, remove providerButton closure #1252

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

russellwheatley
Copy link
Member

@russellwheatley russellwheatley commented May 9, 2025

  • Allow users to opt-in for email provider sign-in.
  • Removed the providerButton closure on AuthPickerView.

Question

  • If the user doesn't opt-in for email provider sign-in, it will also hide email link sign-in. Presumably that is what we want?

if authService.emailSignInEnabled {
Text(authService.authenticationFlow == .login ? authService.string
.emailLoginFlowLabel : authService.string.emailSignUpFlowLabel)
VStack { Divider() }
Copy link
Contributor

Choose a reason for hiding this comment

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

This is kind of lazy of me to ask, but why does the divider need to be in another VStack?

Copy link
Member Author

Choose a reason for hiding this comment

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

That's a good catch - I got this from the example app Peter provided a while ago. I tested using Preview here: d13aea6 (#1252)

and found that it made no discernible difference to the UI so I've removed them.

@@ -127,7 +127,7 @@ extension EmailAuthView: View {
.frame(maxWidth: .infinity)
.buttonStyle(.borderedProminent)
Button(action: {
authService.authView = .passwordRecovery
authService.authView = .emailLink
Copy link
Contributor

Choose a reason for hiding this comment

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

Should these be two separate buttons?

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

@morganchen12 Also - I have a question in the description regarding whether calling AuthService() .withEmailSignIn() should also hide email sign-in. I'm 99% sure that it should but just wanted confirmation.

Copy link
Contributor

Choose a reason for hiding this comment

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

Do you mean the opposite, where not calling .withEmailSignIn() should hide it? That sounds good to me.

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.

2 participants