Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Dependencies ===============
- import {Auth} from 'aws-amplify'
- // Function ===================
- async function getJWT(state){
- if(state.account.authorized){
- const session = await Auth.currentSession()
- const jwt = session.idToken.jwtToken
- }else{
- //handle not logged in
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement