Accessing S3 file using only Cognito and hosted UI without server dependancy

0

Hi,

I have a cognito user and identity pool with Public Client. Through javascipt in callback page, I am able to get the token from Auth Code with PKCE Flow.

However, I am not able to get the temporary credentials to access S3 object. I tried various methods like cognitoUser.setSignInUserSession(idToken, accessToken) to set the token received and get temporary access credentials. But I get the following error when using GetID

AWS.CognitoIdentity.getId()

Error: Token is not from a supported provider of this identity pool

For the same pool, I have a confidential client and everything works without any issues (as it involves passing security key from server side).

Will we be able to access S3 url with only public client and hosted UI?

Any samples are greatly appreciated.

Regards, Raj

回答なし

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン