In an angular CLI web application I need to authenticate users with google accounts.
I'm using the angular_oauth_oidc library to manage all oauth-related tasks. I've configured the OAutService for automatic silent refresh. I can see in fiddler that the service is making the request for token refresh, but the response is an error.
This is the request (without sensitive information) to accounts.google.com:
GET /o/oauth2/v2/auth?response_type=id_token%20token&client_id=[MY_CLIENT_ID]&state=[MY_STATE]&redirect_uri=http%3A%2F%2Flocalhost%3A4200%2Fassets%2Fsilent-refresh.html&scope=openid%20profile%20email&nonce=[MY_NONCE]&prompt=none&id_token_hint=[MY TOKEN] HTTP/1.1
And this is the response:
HTTP/1.1 302 Found
Content-Type: application/binary
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: Mon, 01 Jan 1990 00:00:00 GMT
Date: Thu, 17 Jan 2019 15:49:21 GMT
Location: http://localhost:4200/assets/silent-refresh.html#state=[STATE]&error_subtype=access_denied&error=interaction_required
According to the library documentation and the oidc standard, the request has all the required parameters but I can't make it work.
Did someone succeed making automatic silent token refresh with google accounts?
Thank you