Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

invalid_request error on AWS Cognito Custom UI Page

Tags:

aws-cognito

when going to the custom AWS Cognito UI Page:

https://<your_domain>/login?response_type=code&client_id=<your_app_client_id>

am getting the following error:

An error was encountered with the requested page.

View error

invalid_request

like image 741
Neil Avatar asked Apr 23 '18 10:04

Neil


People also ask

How do I access Cognito hosted UI?

Launch the hosted web UIIn the Amazon Cognito console, choose Manage user pools, and then choose your user pool. In the left navigation pane, under App integration, choose App client settings. Under Hosted UI, choose Launch Hosted UI. The sign-in page of the hosted web UI opens in a new browser tab or window.

What is callback URL in Cognito?

A callback URL indicates where the user will be redirected after a successful sign-in. Enter Sign out URL(s). A sign-out URL indicates where your user will be redirected after signing out. Select Authorization code grant to return an authorization code that is then exchanged for user pool tokens.

How do I customize my Cognito UI?

Sign in to the Amazon Cognito console . In the navigation pane, choose User Pools, and choose the user pool you want to edit. Choose the App integration tab. To customize UI settings for all app clients, locate Hosted UI customization and select Edit.


2 Answers

You need the following in the App client Settings of your user pool:

  • Enable Cognito User Pool as "Identity Provider".
  • Allowed "OAuth Scopes" should have openid enabled.

App client settings

like image 131
xtra Avatar answered Sep 19 '22 13:09

xtra


O-Auth options need to be check as shown in the following picture

oauth options

from https://aws.amazon.com/blogs/aws/launch-amazon-cognito-user-pools-general-availability-app-integration-and-federation/

like image 42
Neil Avatar answered Sep 21 '22 13:09

Neil