Ionic on ios: apple sign in not working (stuck on empty screen)

I use Auth0 in an ionic 4 app. I implemented it according the provided Ionic 4 example: auth0-ionic4-samples/01-Login at master · auth0-samples/auth0-ionic4-samples · GitHub

I configured and enabled the apple social connection with my own ids.
During login I get stuck with a blank screen however. It looks like this:

First screen:

After clicking on Sign In with Apple:

After confirming with my fingerprint:

The whole thing works with username-password login as well as with google social connection. The blank screen only happens with apple sign-in.

To enable apple social connection i followed “Register Apps in the Apple Developer Portal”. Then I entered following in the apple social connection settings:

  • Client ID (here I used the Service-ID)
  • Client Secret Signing Key
  • Apple Team ID
  • Key ID

And then I followed “Add Sign In with Apple to Native iOS Apps”. So I entered following in “Device Setting” under “Advanced Settings” of my application:

  • Enabled Sign in with Apple
  • iOS Team ID
  • iOS App ID (here I entered my Apple App ID, not the Service ID)

In the apple service I entered this:
https://redacted.eu.auth0.com/login/callback

The apple service also asked for a website. I have no idea what to enter here, since this is an app not a website. So I entered the site of my own api for the app.

I think the sign in procedure works, since I see this under Users in the auth0 management page:

But I get no callback from the authorize callback:
code

I hope somebody here can help me out. I am at my wits’ end.

Regards,
Norbert

1 Like

I have same problem with iOS. With Android login with Apple works ok. Actually login works ok with iOS too if I select use other Apple ID and set my Apple ID manually (like I do with Android).

Automatic Apple login with iOS gets me to that same blank screen. If I click Done and login again, then it gets me to the application. This might be related to same kind of problem I have when logging out. With Android after I have been logged out from Auth0 it redirects back to application and opens the welcome page. With iOS it opens same blank screen and I have to click Done manually to get into welcome page.

Can you login like I can or doesn’t it work at all?

1 Like

Hi Markus. Indeed, I have exactly the same behavior. Apple login works on Android and also on iOS for other Apple IDs, where you have to enter the Apple ID manually.

Also, I like to have option { prompt: 'login' } set when calling Client.authorize() (otherwise you can’t switch users after you have logged in once). Which means that the login prompt appears every time. In that case every login fails. If I remove that option then the second login passes, because there is no user interaction.

And yes, I also have the bug with the logout screen, which doesn’t close by itself. I filed a bug report for that one some time ago: Logout doesn't close WebView on ios · Issue #5 · auth0-samples/auth0-ionic4-samples · GitHub

I am suspecting as well, that both problems might have the same cause. Maybe if the inappbrowser would close automatically at Apple sign in, it would work?

I hope somebody here with more in depth knowledge could find out what’s going wrong under the hood.

It’d be really nice if someone could help with this issue. My app was rejected in AppStore review because I hadn’t enabled Apple login. Now I put it on but there’s problems. Let’s see how the next review goes.

I’m not using prompt:login for switching user. First I used Auth0Cordova for logout but it has problems to do logout right and it’s now implemented like in https://auth0.com/docs/quickstart/native/ionic4/01-login. Now only problem in logout is that blank screen. When Done is clicked then you can login with different user.

1 Like

We also experience this problem when using the Apple Sign-In on iOS 13 devices when being signed in on the device with an Apple ID. We opened a support ticket on this and Auth0 currently tries to resolve this issue together with Apple.
On Android or iOS 12 everything works fine, as it goes through Apples web-based sign-in flow, but on iOS 13 it uses the built-in flow which has issues with redirecting to another website.
It also works fine when using the native Sign-In with Apple button in combination with Auth0.

See also this answer in another post: Sign in with Apple + Universal Login in Swift results in a blank page? - #10 by matt.macadam

1 Like

Thank you very much. Even though it’s bad news. I guess we have to wait until there is news from apple.

Any progress on this, I am dead in the water right now with this problem.

Hi folks,

Im here with the same issue, It only works on below iOS 13 or iOS 13.4+
Anyone here found a solution??

Thanks,

Hi all,

Me too have almost same problem. Could not enable apple signin any help or anyone who has solved this issue.

Also If someone can confirm what should I add in callback-url. I tried with /login/callback.

app-sonicstaff-dev.auth0.com/login/callback

But I am getting Invalid request_uri. Any help please