1 Answer
- Newest
- Most votes
- Most comments
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
answered a year ago
Relevant content
- Accepted Answerasked 5 months ago
- Accepted Answerasked 2 years ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 4 months ago
- AWS OFFICIALUpdated 2 years ago