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})