Closed ideen1 closed 10 months ago
Hello, @ideen1 and sorry to hear the sandbox is giving you trouble with this. Is it working properly on a non-sandbox deployment for your Gen2 app, or are both giving this error?
It may be that the sandbox environment doesn't have the necessary permissions on the Cognito resources to be performing the SAML Auth flow. There may be some adjustments to the fields within defineAuth
that may be needed as well. To ensure we can help get this answered better, I'll transfer this issue to our amplify-backend
repo for better assistance.
@cwomack The non-sandbox deployment is also hitting the same error
After @cwomack moved this issue to the correct repo (this one), I identified a similar issue(#766) that is caused by (#796).
Hey @ideen1, thank you for reaching out. As you have pointed out the issue is currently being tracked on https://github.com/aws-amplify/amplify-backend/issues/766, the Amplify team should provide an update on the issue linked once the fix rolls out. Closing the issue as duplicate, please feel free in adding any additional information on the issue linked.
Before opening, please confirm:
JavaScript Framework
React
Amplify APIs
Authentication
Amplify Categories
auth
Environment information
Describe the bug
When using the new
defineAuth
function in Gen 2, with thesaml
external provider, the sandbox fails to deploy the Cognito resources with the following error:Identity provider arn:ca-central-1:iam::<AWS Account ID>:saml-provider/testSaml is not valid for account <AWS Account ID> (Service: AmazonCognitoIdentity; Status Code: 400; Error Code: NotAuthorizedException; Request ID: <REDACTED>; Proxy: null)
Expected behavior
I would expect the Cognito resources to be created/updated with the SAML provider.
Reproduction steps
Create the defineAuth function with the config defined below under Code Snippet. Run
npx amplify sandbox
or push to repo for deploymentCode Snippet
Log output
aws-exports.js
No response
Manual configuration
No response
Additional configuration
No response
Mobile Device
No response
Mobile Operating System
No response
Mobile Browser
No response
Mobile Browser Version
No response
Additional information and screenshots
No response