PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Saturday, August 6, 2022

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

 August 06, 2022     dart, flutter, oauth     No comments   

Issue

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?


Solution

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]")


Answered By - Raghav shukla
Answer Checked By - Senaida (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home
View mobile version

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing