1

before you hate on me, I tried looking for this information everywhere, and even if I found something similar, nothing really hit the mark. So basically I am implementing this action on google app that communicates with firebase and retrieves information from firebase that is specific for every user. Everything I need is an identifier for the user, nothing super hard, the first thing that I thought was to retrieve the email that the user used to set up the google assistant(I don’t know why, but in my mind I thought it would have been easy). Apparently to do this I would have to dive in the magical world of account linking, which I really wouldn’t like to do. The question is, is there a way to retrieve any kind of unique information about a user without using account linking? And if the answer is no, and I have to set up a OAuth endpoint, is there someone that would help me out? I have no experience in web dev and I tried doing it by myself but I am just completely lost. Thank you in advance.

1 Answers1

0

We don't hate you - but you may hate the answer.

The only unique identifier that Actions on Google provides you is the anonymous userid. You can get this with app.getUser().userId if you're using the node.js library, or it is available in the JSON.

This identifier, however, is unique to just your Action and does not provide any other information, such as email address, for privacy purposes. If you just want to make sure that the user that is visiting you today is the same user as the one that visited you yesterday - this userid should be enough.

If you need an identifier that is available outside of Actions (for example, if you also have a website or a mobile app that users log into), then you will need to use Account Linking, and will currently need to setup an OAuth server.

Setting up an OAuth server is not a straightforward task, and while there are packages and services that are available, exactly which one you should use is not something that can be addressed on StackOverflow. Google does provide a guide about the minimum necessary for a valid OAuth server to work with the Assistant, and it is hoped that they'll provide a better solution in the future.

Prisoner
  • 49,922
  • 7
  • 53
  • 105
  • thank you for the answer, you were right, I'm not so happy with this :D I guess I will have to setup the OAuth server somehow at this point, I just don't know were to start since I've looked up and I cannot find an easy guide on the topic (probably because it is not an easy topic I guess) – Luca Simonato Nov 20 '17 at 17:10
  • I've updated the answer to linik to Google's information about the minimum that is necessary when writing an OAuth server. – Prisoner Nov 20 '17 at 18:45