iosamazon-web-servicesoauthsingle-sign-onamazon-cognito

SSO not working in iOS when using AWS Cognito and Azure AD


We are using Azure AD as OIDC Identity Provider in AWS Cognito. In iOS side, we use ASWebAuthenticationSession to show a web view and let the user login. User can login successfully but the issue is when opening Safari browser in the iPhone and going to the user's Microsoft account, the user needs to input his/her credentials.

Notes:

Anything we're missing for SSO to work between our app and Safari app?


Solution

  • It seems SSO depends on a couple of things

    Found this very useful blog from Okta that summarizes cookies sharing between Safari app, SFSafariViewController, SFAuthenticationSession, ASWebAuthenticationSession.