FirebaseUI-iOS icon indicating copy to clipboard operation
FirebaseUI-iOS copied to clipboard

Differentiate between logging in and signing up

Open ldetmer opened this issue 10 years ago • 35 comments

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

ldetmer avatar Sep 11 '16 19:09 ldetmer

This is something we are looking into with our UX team to determine the best practice moving forward.

drishi94 avatar Sep 19 '16 19:09 drishi94

@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.

cohenadair avatar Dec 21 '16 13:12 cohenadair

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.

yorgosg avatar Jan 24 '17 13:01 yorgosg

@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 avatar Jan 28 '17 18:01 yorgosg

@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.

morganchen12 avatar Jan 30 '17 20:01 morganchen12

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

najdanovicivan avatar May 09 '18 10:05 najdanovicivan

@morganchen12 any thoughts on my suggestion ?

najdanovicivan avatar May 12 '18 08:05 najdanovicivan

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 avatar May 14 '18 17:05 morganchen12

@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

samtstern avatar May 14 '18 19:05 samtstern

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.

morganchen12 avatar May 14 '18 19:05 morganchen12

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.

samtstern avatar May 14 '18 19:05 samtstern

@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 avatar May 14 '18 19:05 morganchen12

@morganchen12 FWIW we have the 'allow new email accounts' boolean flag on android.

samtstern avatar May 14 '18 19:05 samtstern

@samtstern can you provide complete explanation how does 'allow new email accounts' work on Android so that we can have similar functionality on iOS

najdanovicivan avatar May 16 '18 17:05 najdanovicivan

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 avatar May 16 '18 18:05 morganchen12

@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

najdanovicivan avatar May 16 '18 18:05 najdanovicivan

In this case I think we can just immediately display FUIPasswordSignInViewController.

morganchen12 avatar May 16 '18 18:05 morganchen12

Ok. I'll start working on it.

najdanovicivan avatar May 16 '18 19:05 najdanovicivan

I've submitted pull request for allowNewEmailAccounts. However I've noticed some additional things that have to be taken care off

  1. 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 ?

  2. 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

  3. 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

najdanovicivan avatar May 17 '18 16:05 najdanovicivan

  1. You can go ahead and implement this, and we can just hold off its release if it's not in Android (cc @samtstern)

  2. Fixed in bdd3c05. Tests on Auth are still broken due to a duplicate symbols issue; I'm currently working on a fix.

  3. @samtstern can you advise here?

morganchen12 avatar May 17 '18 17:05 morganchen12