Skip to content

Unable to log in with SSO

1

When trying to log in from the command line with aws sso login --profile ... I can add my username, password and mfa code but then I'm taken to a screen with a dialogue that says "Unable to save cookie preferences". When I click dismiss nothing happens. If I do a hard refresh and start the process again the same thing happens. When I look at the console in the browser dev tools I see a lot of CORS errors. I get the same problem when I try to log in directly in my browser with SSO. I'm using the same SSO url I've been using successfully for the past year. What's changed?

  • This is not a problem with your credentials, but with how cookies and CORS are handled in the browser during SSO. Check for AWS SSO changes, browser updates, or network security changes. Outdated AWS CLI may not be compatible with new SSO flows. Upgrade AWS CLI to the latest version: pip install --upgrade awscli

asked a year ago494 views

1 Answer
-2

It sounds like you're experiencing an issue with AWS IAM Identity Center (formerly AWS SSO) authentication that could be related to several factors. Here are some troubleshooting steps to help resolve your problem:

  1. Browser cache and cookies: The "Unable to save cookie preferences" error and CORS issues often indicate browser-related problems. Try:
  • Clearing your browser cache and cookies
  • Using a private/incognito browsing window
  • Trying a different browser altogether
  1. SSO token cache: Your SSO token cache might be corrupted. Delete the ~/.aws/sso directory on your local machine and then attempt to authenticate again.

  2. Time synchronization: Verify that your device's date and time settings are correct and properly synchronized. AWS authentication is sensitive to time discrepancies, which can cause authentication failures.

  3. Browser extensions: Temporarily disable any browser extensions, especially those related to privacy, ad-blocking, or cookie management, as they might interfere with the authentication process.

  4. Network issues: CORS errors could indicate network problems or proxy settings interfering with the authentication flow. Check if you're on a corporate network with restrictions or if a VPN might be causing issues.

  5. Expired credentials: If your organization recently made changes to the authentication setup or if your credentials have expired, you might need to contact your system administrator for updated configuration.

If these steps don't resolve the issue, it's possible that your organization has made changes to the SSO configuration or that there's an ongoing issue with the AWS IAM Identity Center service. In that case, reaching out to your AWS administrator would be the next best step.
Sources
Invalid client provided Message when Signin in to AWS APP Studio | AWS re:Post
Google SSO with AWS IAM Identity Center fails | AWS re:Post

answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.