node-red-contrib-oauth2
node-red-contrib-oauth2 copied to clipboard
Google API Example
Would it be possible to get an example of how to use this with google API?
I'm getting a HTTP 200 back, but the payload is a HTML sign-in page.
I'm guessing this is the redirect to the user sign-in page but i'm not sure how to set up the redirect to work.
I've got the redirect uri /oauth2/redirec open
Thanks.
I've tried setting it in the credentials object
msg.oauth2Request = {
"access_token_url": "https://accounts.google.com/o/oauth2/v2/auth",
"credentials": {
"grant_type": "authorization_code",
"client_id": "<ID>",
"client_secret": "<SECRET>",
"scope": "https://www.googleapis.com/auth/tasks",
"redirectUri": "https://nodered.example.com/oauth2/redirect",
"redirect_uri": "https://nodered.example.com/oauth2/redirect",
},
};
return msg
;
According to this its just a get request. Is this project doing a POST? https://developers.google.com/identity/protocols/oauth2/javascript-implicit-flow
Hello @Shazib,
Thank you for the information you provided. I am working to resolve this issue with Google authentication. I noticed that there's an extra confirmation screen that the node wasn't expecting, which led to this problem.
I am adjusting the authentication flow to handle this redirect properly. I hope to have this resolved soon. I appreciate your patience.
Best regards
Hello @Shazib, I'd like to inform you that I've created a branch, and it's already functional. If you'd like to test it, here's the link. I'll be creating a release soon.
Best wishes.
Hello @Shazib, I'd like to inform you that I've created a branch, and it's already functional. If you'd like to test it, here's the link.
I'll be creating a release soon.
Best wishes.
Thanks! I will check it out if I get time soon :)