PHP Classes

Can we force email or username?

Recommend this page to a friend!

      PHP OAuth Library  >  PHP OAuth Library package blog  >  How to Implement PHP ...  >  All threads  >  Can we force email or username?  >  (Un) Subscribe thread alerts  
Subject:Can we force email or username?
Summary:Can we force email so that user can not login with other emails?
Messages:2
Author:sameer shelavale
Date:2015-02-10 12:49:48
 

  1. Can we force email or username?   Reply   Report abuse  
Picture of sameer shelavale sameer shelavale - 2015-02-10 12:49:49
for Gmail API, can we pass the email as a parameter so that the user can use only that email for login(or that email is prepopulated in the Google Login page)?

  2. Re: Can we force email or username?   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2015-02-10 15:36:29 - In reply to message 1 from sameer shelavale
No, I am afraid there is no way to make the user authorize using a specific email.

What you can do is to call Google API to get the user profile and check if that is the email you want. If not, tell the user to authorize again with the desired email.