Rohit Jadhav
Rohit Jadhav

Reputation: 165

Error while doing IdP initiated login using AWS Cognito

I am using IdP as Onelogin & aws cognito(SP). SP initiated login working fine. But when i clicked on App Portal/ Home -> on my application, then it redirects to cognito with error prompt "Invalid relayState from identity provider" I checked relay state parameter in One-Login configuration is correct like https://***:81/login which is our login page URL.

enter image description here

Upvotes: 15

Views: 10460

Answers (3)

Nemeton
Nemeton

Reputation: 743

Not writing an answer but rather linking the official Cognito doc, that talks about Setting up SAML Federation in AWS Cognito for IDP initiated Single Sign On (SSO).

https://aws.amazon.com/blogs/security/how-to-set-up-saml-federation-in-amazon-cognito-using-idp-initiated-single-sign-on-request-signing-and-encrypted-assertions/

Hope this helps you as much as it helped me.

Upvotes: 0

user2977636
user2977636

Reputation: 2296

Note that as of February 2024, Cognito does support the IDP initiated flow. If you are using IDP-initiated SAML, you need to update the format of your Relay State. Refer to my answer here for more details on how to enable this within cognito: AWS Cognito: support of SSO IdP-initiated workflow

Upvotes: 1

callo
callo

Reputation: 1632

Cognito only supports SP initiated flow.

So the flow must go Cognito Authorize endpoint -> IDP -> back to Cognito.

Upvotes: 14

Related Questions