Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sign in with Apple #45

Closed
leshik opened this issue Jul 15, 2019 · 16 comments · Fixed by #90
Closed

Sign in with Apple #45

leshik opened this issue Jul 15, 2019 · 16 comments · Fixed by #90
Labels
Milestone

Comments

@leshik
Copy link

leshik commented Jul 15, 2019

Hi,

Is it possible to make this plugin work with Sign in with Apple, that is expected to come this fall with iOS13?

@moberwasserlechner
Copy link
Collaborator

Hey,

as I would like to support that in my projects as well I will try to make it work. But I have not look into it yet.

I only heard some rumors that Apple will try to force apps to use it, if they use Google or Facebook.

BR

@moberwasserlechner moberwasserlechner added the enhancement New feature or request label Jul 15, 2019
@leshik
Copy link
Author

leshik commented Jul 15, 2019

Apple will try to force apps to use it, if they use Google or Facebook

yeah, that's exactly why I'm asking :) we already have google sign in, don't want to be thrown out of AppStore because of it ;)

@zwacky
Copy link

zwacky commented Sep 3, 2019

Hey, chiming in on this issue since it's only a short time until iOS 13 hits the market. I suppose it's not compatible, yet? are there plugins where this is already working? maybe need some help?

@moberwasserlechner
Copy link
Collaborator

No it isn't ;). I will get to it as soon as iOS 13 is released. Apple will not force every app to support this without a proper time to get it done. At least I hope they will not.

I don't know if other plugins support that feature yet as I only use this one.

You could always try to get it working if Apple uses standard oauth2 it might work out of the box.

@moberwasserlechner moberwasserlechner added this to the 1.1.0 milestone Nov 25, 2019
@moberwasserlechner
Copy link
Collaborator

moberwasserlechner commented Dec 14, 2019 via email

@moberwasserlechner
Copy link
Collaborator

moberwasserlechner commented Dec 14, 2019 via email

@moberwasserlechner moberwasserlechner modified the milestones: 1.1.0, 1.2.0 Jan 9, 2020
@moberwasserlechner moberwasserlechner removed this from the 1.2.0 milestone Apr 9, 2020
@moberwasserlechner
Copy link
Collaborator

As the iOS part does not require any additional dependencies I could just support it on that platform.

https://github.com/rlfrahm/capacitor-apple-login/blob/master/ios/Plugin/Plugin.swift

But of course it would be nice to get it working with Android and the Web too.

@moberwasserlechner moberwasserlechner added this to the 2.1.0 milestone Apr 20, 2020
@moberwasserlechner
Copy link
Collaborator

moberwasserlechner commented Apr 21, 2020

On ios the plugin will detect that the ios13 UI is needed, when authorizationBaseUrl contains https://appleid.apple.com/auth/authorize. This is needed for other platforms and ios 12 and earlier anyway.

See https://developer.apple.com/documentation/sign_in_with_apple/sign_in_with_apple_js/incorporating_sign_in_with_apple_into_other_platforms

Platforms that support custom URL schemes—iOS 12.0 and earlier and Android—must handle the data resulting from the authorization flow by storing it on their app server in the logic of their redirect_uri endpoint. You must then redirect the custom URL scheme to give control back to the app.

@AlvinTCH
Copy link

Hello. I have tried to use this plugin for the Apple Sign in. Am successful in getting the popup and stuff but is stuck at identifying the redirectUrl as the regular 'bunde.name:/' doesn't seem to be accepted by Apple. Hope you can provide insight to how it should be done as I can't seem to find the answer in any forums

{ appId: appId, authorizationBaseUrl: "https://appleid.apple.com/auth/authorize", responseType: "code id_token", redirectUrl: '' // am stuck here, scope: "name email", additionalParameters: { "response_mode": "form_post" } }

@moberwasserlechner
Copy link
Collaborator

Hi @AlvinTCH, this plugin does not support it yet. I started working on it in its own branch but it is not ready to use.

@AlvinTCH
Copy link

@moberwasserlechner Thanks for working on it. Really appreciate that. Can't publish my app now that they made it compulsory to be included in the app.

@moberwasserlechner
Copy link
Collaborator

moberwasserlechner commented Jun 15, 2020

You might use another plugin just for swa for the time being because I will not be able to release a version with that feature before end of july.

@AlvinTCH
Copy link

I am currently using another plugin for it. Putting it here if anyone needs it
https://github.com/rlfrahm/capacitor-apple-login
It's good for now but the package is not being actively maintained. Will look forward to your implementation. Cheers!

@vildhjarta8
Copy link

@AlvinTCH you can try this plugin, it is a fork of yours, but community will maintain it.
https://github.com/capacitor-community/apple-sign-in

@moberwasserlechner
Copy link
Collaborator

(Re)testing Siwa is a little weired. To get the full dialog shown I had to reset siwa in my phones settings -> Apple ID -> Password & Security -> Apps using Apple ID -> Delete the app from the list

See https://stackoverflow.com/questions/58995015/reset-sign-in-with-apple-to-the-initial-create-account-state for more details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants