123
123

Reputation: 11

firebase authentication limited to one provider

I want to limit the Authentication to my Firebase project to only one specific provider. Is it possible to deny authentication for email addresses other than @specific.provider.com?

Upvotes: 0

Views: 83

Answers (2)

Alex Mamo
Alex Mamo

Reputation: 139019

If you want to allow only users with a certain mail provider access to you project, you need to create a method that can check the email provider for you. Let say you want to restrict users to create an account only if their provider is Google. An email address which belongs to Google looks like this: [email protected]

So, you need to verify which are the characters after @ symbol. If those characters are equals to gmail.com let the user create his account, otherwise Toast a message.

Hope it helps.

Upvotes: 1

Boonya Kitpitak
Boonya Kitpitak

Reputation: 3737

From my understanding you can set up your sign in method in Firebase console like attached image. If you want to deny authentication for email/password just disable it in the console

enter image description here

Upvotes: 0

Related Questions