How can I restrict google login to my company's email domain (@company.com) in flutter?

Viewed 160

Question

What is the best way to prevent users from using an email address that does not end in @mycompany.com from logging in to our internal app through Google auth?

I am new in flutter so can someone provide me the references or tutorial on how to implement this?

1 Answers

match user email with regex if true then company email else not company email.


RegExp(r"^[a-zA-Z0-9.a-zA-Z0-9.!#$%&'*+-/=?^_`{|}~]+@[mycompanyname.com]")
Related