Getting an error logging in with IdP in authorization code grant flow

0

I'm trying to add an identity provider (Okta) to my user pool. I've been able to get the implicit grant flow working for one app client in my pool.

Now I've set up a new app client for the authorization code grant flow in order to support OAuth access to my API.

What I'm seeing is that after redirecting to the cognito oauth2/authorize endpoint, it correctly redirects to the hosted login that allows me to select the identity provider. When I log in through the identity provider, it redirects me back to the hosted login page and displays an error message saying "Something went wrong. Please try again."

I have both the identity provider and the user pool set up for this client. If I log in using username/password to the user pool, it works as expected.

So now I have some questions:

  1. Is this a supported configuration - is it possible to use an IdP with the authorization code grant flow?
  2. How can I find out more about what's going wrong - the error message is not helpful for debugging
jpulse
질문됨 4년 전816회 조회
2개 답변
0

I got it working. I had a custom domain name configured for my pool. If I don't use that custom domain URL to start the OAuth process, I get the error. If I use my custom domain, it works.

jpulse
답변함 4년 전
0

Glad you got it working! The OAuth flows should always be started from the Cognito domain configured .

AWS
답변함 4년 전

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

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

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

관련 콘텐츠