Authorization code flow with custom UI and Cognito

2

I was looking the documentation trying to figure out how to use Authorization code flow with custom UI and Cognito, but looks like this still not possible, am I right?

I have tried somethings as wrap all the call in my api, but doesn't seem this would solve my problem. The main objective is because the HostedUI, doesn't fulfill the requirements that I have to use the Cognito server. Does anyone know how to do this?

질문됨 3년 전3.7천회 조회
2개 답변
1

Hi there, Any news on this? Thanks

profile picture
답변함 6달 전
0

Hi,

It is not currently possible to implement oauth2 authorization code flow without using hosted UI for authentication, this is because there is no public API to retrieve the authorization code itself from Cognito and it has to be passed back to hosted UI after successful authentication.

If you want to use custom UI, you can either just use the SDK to authenticate users using InitiateAuth API or Amplify SignIn (this is not oauth2), or if you must use oauth2 then you need to build your oauth2 endpoints on top of Cognito APIs (similar to Amplify identity broker).

AWS
전문가
답변함 3년 전
  • Are there any plans to add this functionality? To make a public API to retrieve the authorization code?

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인