What is required : a chrome extension that uses google ooauth2.0 to enter the extension and sends data about its action to my servers with an access token, where I get user data from an access token and save its actions, server implementation in php.
What I did : a registered API for accessing the web application API with url redirection http://www.google.com/robots.txt , as explained by http://smus.com/oauth2-chrome-extensions/ .
Based on the same tutorial and their code, I get a user access token in the extension and can send it to my server with data.
Problems:
1) Now on my server I need to get data from this token. I need to call https://www.googleapis.com/oauth2/v1/userinfo?access_token=ya29.AHES6ZRCgM2nEI0-25KvlmIuZdSH6DbY1rhj9M4auzF86kHXobOeFA , but it does not work. 2) when I click on inspect the popup in chrome, I can see the client ID and client secret, shouldn't the secret be safe ??
Therefore, I am lost in the stream ... this is an access token, which should be in the same format. I'm not even sure. If someone did something like this, offer me a complete library with work on the client and server side.
PS Since the Google documentation now says that oauth1.0 is deprecated and will be removed soon (if you provide the entire demo code only in oauth1.0 ..) Please do not offer any oauth1.0 lib ..
user1323456
source
share