Created
May 2, 2019 15:54
-
-
Save skellertor/312e680a1eb90769bee787997899d9b8 to your computer and use it in GitHub Desktop.
Get a session with idToken, accessToken, and refreshToken from cognito
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const sessionData = { | |
IdToken: new cognito.CognitoIdToken({ IdToken: idToken }), | |
AccessToken: new cognito.CognitoAccessToken({ AccessToken: accessToken }), | |
RefreshToken: new cognito.CognitoRefreshToken({ RefreshToken: refreshToken }) | |
}; | |
const currentSession = new cognito.CognitoUserSession(sessionData); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment