showing results for - "aws amplify get jwt token"
Lizbeth
23 Mar 2017
1// Gets current user session token after cognito sign in. 
2
3Auth.currentSession().then(res=>{
4  let accessToken = res.getAccessToken()
5  let jwt = accessToken.getJwtToken()
6  //You can print them to see the full objects
7  console.log(`myAccessToken: ${JSON.stringify(accessToken)}`)
8  console.log(`myJwt: ${jwt}`)
9})