This repository was archived by the owner on Jun 26, 2020. It is now read-only.
This repository was archived by the owner on Jun 26, 2020. It is now read-only.
How to get the Token for API Call #106
Closed
Description
Hi there,
I am trying to create a new method in /serverice/cognito.service.ts that returns the token JWT.
I need the token because I want to call a method in AWS Gateway. This method has a Authorization (Cognito User Pool).
So I wrote the following function in /serverice/cognito.service.ts
getToken() { let token = this.getCurrentUser().getSignInUserSession().getAccessToken().getJwtToken(); console.log('### TOKEN', token); return token; }
Unfortunately this generates an error:
So my question is:
How do I correctly get the Token?
Thank for your help!
Metadata
Metadata
Assignees
Labels
No labels