Cognito User Pool: How to refresh Access Token using Refresh Token

前端 未结 7 1442
星月不相逢
星月不相逢 2020-12-12 23:23

I am using Cognito user pool to authenticate users in my system. A successful authentication gives an ID Token (JWT), Access Token (JWT) and a Refresh

7条回答
  •  南方客
    南方客 (楼主)
    2020-12-13 00:16

    The JavaScript SDK handles refreshing of the tokens internally. When you call getSession to get tokens, in the absence of any valid cached access and id tokens the SDK uses the refresh token to get new access and id tokens. It invokes the user authentication, requiring user to provide username and password, only when the refresh token is also expired.

提交回复
热议问题