Aaswad Satpute
Aaswad Satpute

Reputation: 794

Get user's email ID on Google Home

I'd want to get user's emailID from an Action on Google. I understand that Google Sign-In is the best way to do that. Even though I don't really need the user to sign in to the action, I think there is no other way to get user's email (please correct me if I'm wrong). But according to the documentation,

Google Sign-In for the Assistant is currently in developer preview. You can build Actions that use this feature, but they can't be published at this time.

However, Walgreens action does the same thing. I wanted to know how. I tried to search a lot, and ended up with these answers. I have done this already and it works. But I wanted to know, if there is any way to release an app using Google Sign-In.

If not, do I need to go through OAuth2.0 flow, and if so, I assume I'd need to have my own authentication system in place?

Please correct me if I'm wrong and help me find the best way to get user's emailID. I think there should be something easier than getting an authentication system in place and getting it to support OAuth2.

Upvotes: 1

Views: 196

Answers (2)

nvnagr
nvnagr

Reputation: 2063

if there is any way to release an app using Google Sign-In.

You want the email id of the user. Google sign-in is nothing more than you getting the user's email address (inside a token that is signed by Google so you can verify it). If you just get an email address as a "string" then you'd need to verify it before you can use it. So think of Google sign-in as an optimized UI flow to get a user's email address. Once you get the verified email address from Google, you can let them have access to the data on your site that is under that account.

Let me know if that is not clear.

From a timeline perspective, this should be out of developer preview within a month. Let me know if you want to try using it before that.

Upvotes: 2

Martin Lambert
Martin Lambert

Reputation: 21

From my own research I think you are right. Until the Google Sign In account linking graduates from developer preview you would have to implement an OAuth workflow, which is a bit of a pain (although the implicit one doesn't look too bad). So perhaps the real question is ... when will Google Sign In account linking be fully available? Anyone from Google? Even a ballpark estimate would be useful.

Upvotes: 1

Related Questions