Apple Sign In

Yes, it is a bug @ Apple side. When my app launched in April-20, apple sign in plugin was working fine and private-email was returned. Now, when I check my app again (already in store since then), there is no private-email being returned. Only the real-email is returned (if user selects to show real email during Apple sign In).

So, there is nothing wrong with the plugin. Apple is doing changes. Just use the JWT (the identityToken) to get the email if no email was returned.

Email and name are only returned on first login. To my knowledge there is no way to get it after that. In my research identify token/user id are the only things need to authenticate with Apple on your own server. If you actually run a JWT though a decoder you will see no email returned.

The key is to SAVE the name and email during the first login, thatā€™s what I do.

Hi,
need your help.
Iā€™m developing my game with Solar2d Native, trying to download Scott plugin from market place, but for some reason, it downloads the simulator .lua file instead of the iOS plugin.

Thanks

This has been fixed

1 Like

Thanks @Scott_Harrison I managed to download it.
Thanks @troylyndon for your help.

Now looking into the documentation wonder isnā€™t there is a need for sign out? searching the web I see the way is using ā€œiOS Settingsā€, but I saw many apps where they provide UI to sign outā€¦
so to be sure, App will not be rejected for not having ā€œsign outā€ UI?

Thanks

I only login once to get the name, email, etc. and do exactly what the code I gave you does, nothing more or less. In this way, I never have the need to log them in. I handle Game Center with Scottā€™s other plugin, although I donā€™t support it, I use it to get their Game Center GamerID, then store it away, too, as a way to recognize their device.

I always have error 1000, Authorization Errorā€¦

1000 usually means you are trying on Simulator(which does not work) or you are missing entitlement in provisioning profile and/or build.settings see link https://gist.github.com/scottrules44/51ed52418d0e280af0d3f8c250d38e83

1 Like

Looks like we need here a manual how to create another profile, where to get a certificate, etc.
I started with thisā€¦ It requires certificates againā€¦ Where to get them? Are they the same which were generated on github? I am sorry I am totally lost in those iOS complicationsā€¦ Android is so easy :frowning:

Otherwise I got this:

ERROR ITMS-90163: "Invalid Code Signing Entitlements. The entitlements in your app bundle signature do not match the ones that are contained in the provisioning profile. The bundle contains a key that is not included in the provisioning profile.

Under apple dev website under account, you should be able to manage your provisioning profiles and edit the profile to support apple sign in capabilities

I found this procedure:

Procedure

  1. Run Google Chrome, Mozilla Firefox or Safari.
  2. In the iOS Dev Center, click Certificates, Identifiers & Profiles.
  3. In the iOS Apps panel, click Provisioning Profiles.
  4. Click +.
  5. Select iOS App Development and click Continue.
  6. Select an App ID to associate with the provisioning profile and click Continue.
    To be able to use one development provisioning profile across multiple apps, select a wildcard App ID, if available.
  7. Select one or more certificates for development to include in the provisioning profile and click Continue.
    Only certificates for development are listed.
  8. Select one or more devices to include in the provisioning profile and click Continue.
  9. Enter a name for the profile and click Generate.
  10. (Optional) Click Download to download the provisioning profile.

It asked to UPLOAD a certificateā€¦ well, I had one which was generated during github set up, so that I was able to compile iOS apps without having an iOS device.
I fed it to the siteā€¦ I am not sure if it was a right thing to do, but as a result I got another cer-file back, it is called ios_develpment.cer

The site says:

Download your certificate to your Mac, then double click the .cer file to install in Keychain Access. Make sure to save a backup copy of your private and public keys somewhere secure.

Well, I do not have a Mac, do I need to upload it to github?

In other words to make Apple Sign In working a user needs more extended tutorial. I have been trying to set it up for a week now, no success.

I still cherish the idea that one day this plug in will workā€¦ and play around the code.
Now I got a different err message which is goodā€¦ because it is something different and tells me that there is a progress :smiley:

parameter ErrorCode = 1102

[2021-12-24 01:33:29 UTC] <main> DBG-X: parameter ErrorMessage = ERROR ITMS-90163: "Invalid Code Signing Entitlements. The entitlements in your app bundle signature do not match the ones that are contained in the provisioning profile. The bundle contains a key that is not included in the provisioning profile:

How to change bundle signature?

I have not used the automation before but under step 2 " Creating an App ID", under 5 / iv you need to enable Apple Sign in.

Then you need to download and upload a new provisioning profile under step 4 " Creating a provisioning profile" in Utils folder. You can verify the Apple Sign in on provisioning profile page.

1 Like

That is exactly what I was thinking of, but could not figure out the right sequence of steps. Once a profile is changed/saved, it has to be downloaded and set into the project!! (More over you cannot download an existing profile unless changes were made! I had to tick off and then tick on an existing tickā€¦) Thank you very much for pointing me to the right direction!

My app has compiled without errs and now it works on iPhone.

Running it ONCE is OK, but how about defining same user on another device in case if email is hidden? Is there a unique string to define specific user even if email is hidden?

The email should be same if the Apple account is the same between devices, also event.user gives you an account specific UserId

To my research if an email is hidden a relay-email is regenerated again if you reinstall (remove & install) the app, soā€¦ it is not unique. Event.user also changes to my surprise.

event.user should not change at all. I just tried deleting my test app and reinstalling my test app and returns the exact same .user. I am not sure what your setup is .user should be the same between apple dev accounts

" The user identifier [the event.user] has the following characteristics:

  • Consists of a unique, stable string, and used as the primary identifier of the user
  • Uses the same identifier across all of the apps in the development team associated with your Apple Developer account
  • Differs for the same user across different development teams, and canā€™t identify a user across development teams
  • Doesnā€™t change if the user stops using Sign in with Apple with your app and later starts using it again
  • Typically stores alongside the userā€™s primary key in your database"
1 Like