-
Notifications
You must be signed in to change notification settings - Fork 451
Getting errors with use case 17 #162
Comments
value should be one of us-east-1, eu-west-1, us-west-2 or ap-northeast-1. As for printing the refresh token, like ID token, we have a get method. getRefreshToken which also returns a JWT token. |
When I run the following: idToken.textContent = result.getIdToken().getJwtToken();
accessToken.textContent = result.getAccessToken().getJwtToken();
refreshToken.textContent = result.getRefreshToken().getJwtToken(); The id and access token requests succeed, but the getRefreshToken() fails.
|
I just solved the refresh token issue with this: |
My Also, it is this part of the code that throws an error. AWS.config.credentials.refresh(function (error) {
if (error) {
console.error(error);
} else {
console.log('Successfully logged!');
}
}); |
Can you post a service request id for one of these failed requests with the time stamp? |
Date:Wed, 28 Sep 2016 13:26:43 GMT |
You can't use:
Above 'loginKey' will be interpreted literally and not by it's value. Instead create an empty object, assign the value of loginKey as it's key with its value being result.getIdToken().getJwtToken() For example:
|
You could also potentially use ES6 if you are setup for it: AWS.config.credentials = new AWS.CognitoIdentityCredentials({
...identity,
Logins: {
[`cognito-idp.${AWS_REGION}.amazonaws.com/${POOL_ID}`]: session.getIdToken().getJwtToken()
}
}) |
How can I get identityPoolId ? |
@tbiinfotech, you should create an Identity Pool, see http://docs.aws.amazon.com/cognito/latest/developerguide/identity-pools.html |
I get this console output when I run the code below:
POST https://cognito-identity... 400 (Bad Request)
Error: Invalid login token. Issuer doesn't match providerName(...)
How do I make these errors go away?
How do I
console.log()
the refresh token string?As a side note, use case 17 seems to mix in ES6 function formatting and includes an extra tab on the last line. The full word
error
is used as opposed toerr
.What does
console.log('Successfully logged!');
mean? Does that mean successfully logged in, or is some sort of aws server logging operation taking place?The text was updated successfully, but these errors were encountered: