amazon web services - Cognito - User Pools App Integration and Federation - ¿How refresh id_token? -


im using new feature of aws cognito, app integrated user pool more detail see https://github.com/aws/amazon-cognito-auth-js. here there example, in example can id token, access token refresh token empty.

i checked documentation in amazon congito --> amazon cognito api reference --> amazon cognito auth api reference --> authorization endpoint

  • for scope without openid

"the amazon cognito authorization server redirects app access token. since openid scope not requested, id token not returned. a refresh token never returned in flow. token , state returned in fragment , not in query string".

  • for scope openid

"the authorization server redirects app access token , id token (because openid scope included)."

note: here dont said nothing refresh token, response endopoint

"https://your_app/redirect_ur#id_token=id_token&access_token=access_token&token_type=bearer&expires_in=3600&state=state"

then ¿i dont know how can refresh id_token use more hour? (whit openid scope)

there 2 auth flow

  • implicit flow: sends tokenid access token
  • auth grant flow:at first code, can interchange triplet token (tokenid, access token , refresh token)

i using implicit flow , couldnt refresh token. in example, in index.html file, there line "auth.usecodegrantflow();" if uncomment line switch implicit flow --> auth grant flow. in moment there pull request because there bug in flow. more detail enter link description here (pull request #32)

i have changed dist/amazon-cognito-auth.js file same file pull request , work fine

note: important configure app in cognito user pool without secret because if dont have "invalid_client" error. because sdk doesnt contemplates header "authorization" when post /oauth/token endopoint in auth grant flow


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -