I'm writing an application for limited amount of users and logging to app is designed only via google accounts. Now I need to add functionality of adding permissions of accessing app based on email address. Problem is, on the database level, verification of permission to access app is based on Google ID. Since Google ID is more of less not a secret information, is there a way how to get Google ID of account based on email address, without actually logging in with this account?
Asked
Active
Viewed 611 times
2
-
im sorry what do you mean by ID? is the id not just the email address normalized, and without '@gmail.com'? can't you just strip the periods and plus signs and compare lowercase? – digibucc Apr 07 '17 at 13:35
-
1While your email address might be changed, the ID is unique number of every google account. This number is never changed and identifies always one particular account. Like in any database, would you put a primary key on email in users table, or on a unique record id? EDIT: Also email on google account doesn't have to be @gmail.com. You can have google account with any email address you like - you don't have to have a gmail mail box. – Patrik Šimunič Apr 07 '17 at 15:52