Hello,
I have a JS website that uses "Sign in with Apple" with AppleID.auth.signIn :
- It redirects to
appleid.apple.com
- It redirects to my backend with a form POST
- 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 :
- A
faceId
popup appears over my app - The user is redirected to
appleid.apple.com
- A second
faceId
popup appears - It redirects to my backend with a form POST
- 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
andRedirect URLs
in mySign 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
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:
- Implementing User Authentication with Sign in with Apple
- Simplifying User Authentication in a tvOS App
Cheers,
Paris X Pinkney | WWDR | DTS Engineer