Differentiate between logging in and signing up
Hi,
I would like to put in a feature request to differentiate between signing in and signing up. Right now the buttons always say "Sign In". It would be really nice to pass in a parameter that allowed us to set the language to "Log in" or "Sign up".
This request is based off of user feedback, people have come to our sign up screen and asked where do I Sign Up?
Thank you! Laura
This is something we are looking into with our UX team to determine the best practice moving forward.
@ldetmer As a temporary workaround, you may be able to use custom strings. The documentation doesn't specifically mention buttons, but I don't see why they wouldn't be included.
I posted a question on stackoverflow on using custom strings:
http://stackoverflow.com/questions/41829364/use-different-bundles-to-load-strings-from-on-runtime-in-ios
Please have a look and let me know if you have any ideas on this.
@mcdonamp , @drishi94 could you please provide an estimation as to when this task will be implemented? I see that on Sep 12 a priority:p3 tag was added to the issue, but I don't understand how priorities work, since there are almost 4 months past since then and I see that some p:2 tasks are not done also. I think this is an important issue, because otherwise users will be asked to "sign in" to an app that they haven't yet signed up. I assume it is also easy to fix, because all it needs is changing some labels.
Please let me know, thanks.
@yorgosg it's unlikely either of them will have time to work on this soon.
Until then, PRs to expose more customizability would be good--FirebaseUI Auth is intended to expose a good auth flow by default, but our framework shouldn't be hostile toward developers who want to do extra work to add onto that.
What about adding the boolean flat autoDetectSignup to FUAuth defaulted to YES;
if parameter is set to NO FUI FUIEmailEntryViewController will not be displayed. Instead it will directly show FUIPasswordSignUpViewController
In such case if email field is blank right navigation button will be "Sign Up" once the user add any character to the email field it will switch to "Sign-In"
Additionally we can implement boolean flag disableSignUp which will completely disable signup
If mentioned functionality is good to go I can implement the feature snd submit a PR
@morganchen12 any thoughts on my suggestion ?
This mostly sounds good to me but the changing text seems potentially confusing. I don't have a better UX approach though.
@samtstern WDYT?
@morganchen12 how does the iOS flow differ from the Android flow? On android we have:
- A first screen that only has an email box and a "next" button
- Three cases:
- Never seen the email --> sign up screen
- Email has a password already --> sign in screen
- Email is linked to some social account --> move to that social flow
It's the exact same thing, but the issue we're trying to solve is before any of the three cases when entering the email we show "Sign In". In cases where the user doesn't have an account yet this led to confusion because there was no "Sign Up" text input.
Oh I see. On Android we just say Next and it seems to satisfy both cases.
Oh but now that I look at it, the title of the screen is Sign in so I can see we have the same problem.
@najdanovicivan let's do this in two parts. We can implement the flag for disabling sign-up and only allowing sign-in since that's a separate issue.
@morganchen12 FWIW we have the 'allow new email accounts' boolean flag on android.
@samtstern can you provide complete explanation how does 'allow new email accounts' work on Android so that we can have similar functionality on iOS
allowNewEmailAccounts set to NO would only allow login from accounts with emails that already exist in the auth database. This is useful for invite-only services that don't allow direct sign-up, but still want to allow for people to use third-party providers.
So instead of going to the "register new user" flow, the Auth flow would always go to login.
@morganchen12 in such case if only email and password method is enabled should FUIEmailEntryViewController be displayed or should we immediately display FUIPasswordSignInViewController ?
I understand that FUIEmailEntryViewController will be needed in case when social login methods are ebabled
In this case I think we can just immediately display FUIPasswordSignInViewController.
Ok. I'll start working on it.
I've submitted pull request for allowNewEmailAccounts. However I've noticed some additional things that have to be taken care off
-
Left bar button for closing the signup view 'cancelBarButton' is added in viewWillAppear method. It will be good to add hideCancelButton parameter for FUIAuth. Does something similar exist on android ?
-
There is an issue in FUIAccountSettingsOperation line 183 completion block. It breaks the compilation. It should be changed to ^(FIRAuthDataResult * _Nullable authResult, NSError *_Nullable reauthError) { ... I can submit separate PR for this
-
I don't know how this works on android but allowNewEmailAccounts does not impact social logins. So if any additional providers are enabled user will still be able to create the account. We can check newUser property from FIRAdditionalUserInfo and delete account in such case. but it won't make much sense. The only case It may have use is if signups are enabled only on specific dates or incorporate the use of Firebase Remote Config for enabling/disabling signup. Otherwise user will have no way to create account at all. More info how android implementation takes care of this will be useful
-
You can go ahead and implement this, and we can just hold off its release if it's not in Android (cc @samtstern)
-
Fixed in bdd3c05. Tests on Auth are still broken due to a duplicate symbols issue; I'm currently working on a fix.
-
@samtstern can you advise here?