lupidan / apple-signin-unity

Unity plugin to support Sign In With Apple Id
MIT License
598 stars 85 forks source link

How to restrict login options to "Apple Sign In" instead of showing form-based logins as well? #155

Open derwaldgeist opened 1 year ago

derwaldgeist commented 1 year ago

Our app uses multiple ways of authenticating a user, including login with username and password. Since some recent iOS update, everytime the Apple Sign In dialog pops up for a user that already had logged in with Apple before, Apple's login dialog shows all username/password options in addition to the actual Apple Sign In option. These login methods won't work, as there is no dialog to put a username and password in on our very first app screen. Is there a way to prevent iOS from showing these additional credentials, i.e. restrict the login options to Apple Sign In only?

lupidan commented 1 year ago

It may be that it's detecting a pair of User Id+Password inside the keychain for your particular app identifier, probably used in the past, or maybe in a website that shares your app ID or associated domain.

The "QuickLogin" (which at some point should be renamed to "CheckExistingCredentials" or something similar...) does check both SIWA, and keychain credentials, I believe that's why it shows both options in your particular case. I don't think it's related to the updated iOS version.

If you would like to strictly restrict it to SIWA, with the current code, I suggest you just call "LoginWithApple" and that's it.

derwaldgeist commented 1 year ago

Thanks for the feedback! Just saw it, so sorry for the late response.

If I understand you correctly, "LoginWithApple" would work as a QuickLogin substitute?

Our app actually supports logins with username and password. If the QuickLogin supports this as well, is there a way to get that data and pass it to our login mechanism?