Advertisement
Guest User

Untitled

a guest
May 26th, 2019
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. // Dependencies ===============
  2.  
  3. import {Auth} from 'aws-amplify'
  4.  
  5. // Function ===================
  6.  
  7. async function getJWT(state){
  8.  
  9. if(state.account.authorized){
  10. const session = await Auth.currentSession()
  11. const jwt = session.idToken.jwtToken
  12. }else{
  13. //handle not logged in
  14. }
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement