"Sign in with Apple" on iOS

Hello,

I have a JS website that uses "Sign in with Apple" with AppleID.auth.signIn :

  1. It redirects to appleid.apple.com
  2. It redirects to my backend with a form POST
  3. Then I redirect the user to my frontend

I bundled my website as a webview in an app for iOS. When using the functionality on iOS :

  1. A faceId popup appears over my app
  2. The user is redirected to appleid.apple.com
  3. A second faceId popup appears
  4. It redirects to my backend with a form POST
  5. it gets redirected to my frontend in an embeded Safari. When closing the embeded browser, the user is not connected on my app

I would like my user to be redirected to my app instead of staying in the embeded browser.
I would like to eliminate the double faceId popups

  • The functionality works in the web (Safari desktop and mobile), as a PWA, and on Android. So I think I have properly configured the Domains and Redirect URLs in my Sign in with Apple service.
  • When I click on a link that points to my website from Safari, it opens my iOS app. So I think I have properly configured the associated domains.
  • When testing the functionality from an iPhone emulator in XCode, it works (but uses a simple appleId/password form instead of faceId)

I could not find an answer on the forums that solved my problem. I can provide code and screen captures.

Thank you

Answered by DTS Engineer in 801986022

Hi @LorenzoRamify,

The behavior you describe is expected when using the Sign in with Apple web flow in an embedded browser tab. To achieve your desired behavior, you must use the native API via the Authentication Services framework. Please see the documentation below for more information:

Cheers,

Paris X Pinkney |  WWDR | DTS Engineer

Hi @LorenzoRamify,

The behavior you describe is expected when using the Sign in with Apple web flow in an embedded browser tab. To achieve your desired behavior, you must use the native API via the Authentication Services framework. Please see the documentation below for more information:

Cheers,

Paris X Pinkney |  WWDR | DTS Engineer

"Sign in with Apple" on iOS
 
 
Q