maxmantz / redux-oidc-example

Small ReactJS application to demonstrate the usage of redux-oidc
MIT License
108 stars 68 forks source link

Google OAuth: Refresh token not present in token response #33

Open anto-pt opened 3 years ago

anto-pt commented 3 years ago

Hi @maxmantz

I have already implemented Keycloak with redux-oidc. It works really well. Now I'm trying with Google OAuth. I'm facing the following issues

  1. Refresh token is not present in token response. Google docs suggests to pass access_type=offline to get the refresh token. When I tried to pass that in userManagerConfig it's not passing as a param in token endpoint. Seems it's not a configurable thing in redux-oidc library as I checked the lib classes. How to get the refresh token with Google OAuth in token response?

Someone suggest to pass offline_access in scope. But it's not a supported scope in Google. Any help would be appreciated.

  1. Google OAuth expecting client_secret to get the token response along with authority and client_id. But I don't see that in your example. Not sure how that works for you.

  2. Access token couldn't be used for getting resource from API since it's not a JWT token. I can able use only id_token. Is this okay?

  3. End_session_endpoint is not available in Google OAuth well known configurations. So I'm getting end session endpoint missing error while logout.

Appreciate your inputs on this. Mainly I need inputs on [1] Refresh token from Google

anto-pt commented 3 years ago

Can someone help me to get refresh token from Google OAuth?