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 support for disabling email/password signup #230

Closed
morganchen12 opened this issue Jan 26, 2017 · 8 comments
Closed

Add support for disabling email/password signup #230

morganchen12 opened this issue Jan 26, 2017 · 8 comments

Comments

@morganchen12
Copy link
Contributor

Add support for disabling email/password sign-up in the case where people want to use FirebaseUI for invite-only services.

Mirrors firebase/FirebaseUI-Android#536

@long1eu
Copy link

long1eu commented Dec 23, 2017

any news on this?

@morganchen12
Copy link
Contributor Author

This has been released.

You can disable email sign-in with the signInWithEmailHidden property on FUIAuth.

@long1eu
Copy link

long1eu commented Feb 2, 2018

I have only Phone Auth selected, will this automatically start the phone auth?

@morganchen12
Copy link
Contributor Author

No. You should use this method on the phone auth provider directly.

@long1eu
Copy link

long1eu commented Feb 2, 2018

thanks!

@johncovele
Copy link

This issue was to disable email SIGN UP, not SIGN IN. signInWithEmailHidden has nothing to do with Sign Up. Why is this closed? Looks like this feature is very sorely needed, and is apparently already present on Android.

There are many use cases where you don't want the user creating their own accounts, you only want them to log in via a mobile app, with a email/password that is previously created.

@johncovele
Copy link

johncovele commented Apr 12, 2018

Since I'm building with source code, I was able to do something like this (for email auth):

FUIEmailEntryViewController.m:
`
// New user.

if ( DISABLE_ACCOUNT_CREATION ) {
UIAlertController *alertController = [UIAlertController alertControllerWithTitle:@"Email Not Found"
message:@"That email was not found" preferredStyle:UIAlertControllerStyleAlert];
[alertController addAction: [UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleCancel handler:nil] ];
[self presentViewController:alertController animated:YES completion:nil];

} else {
UIViewController *controller;
if ([self.authUI.delegate respondsToSelector:@selector(passwordSignUpViewControllerForAuthUI:email:)]) {
controller = [self.authUI.delegate passwordSignUpViewControllerForAuthUI:self.authUI email:emailText];
} else {
controller = [[FUIPasswordSignUpViewController alloc] initWithAuthUI:self.authUI email:emailText];
}
[self pushViewController:controller];
}
`

@morganchen12
Copy link
Contributor Author

Sign-up can now be disabled via the allowNewEmailAccounts property.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants