1 réponse
- Le plus récent
- Le plus de votes
- La plupart des commentaires
0
Hi,
No your example:
AWS.config.credentials = new AWS.CognitoIdentityCredentials({
IdentityPoolId: '<the pool that is shared by android and browser app>',
Logins: {
'cognito-idp.<region>.amazonaws.com/<the_POOL_ID>': <the_jwt_token_derived_from_the_android_login?>,
}
});
is in order to use Cognito Identity Pool to exchange an OAuth2 Identity token for Temporary AWS Credentials. It does not allow to solve the challenge you have.
There two options for you:
- Loading the URL in the webview with an Authorization header set to the value
Bearer <Base64 encoded Access Token>
expecting this to load the content in the webview from an API Endpoint authenticated by the provided Access Token - Access back the Hosted UI in the web view, if you logged in less than 1 hour ago through the Hosted UI, there will be a SSO mechanism kicking in
Neither of those are provided by the Cognito JS library and required your own implementation.
Jeff
répondu il y a un an
Contenus pertinents
- demandé il y a un mois
- demandé il y a un an
- demandé il y a 6 mois
- AWS OFFICIELA mis à jour il y a 2 ans
- AWS OFFICIELA mis à jour il y a 2 ans
- AWS OFFICIELA mis à jour il y a un an
Hello, My question is, if the user is already authenticated, why do you need to send a token to cognito again? Just have a "if" statement in your code to see if the user is logged in, and if not, make another call to cognito. Unless i'm missing something here...