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

Face ID flow only invokes the success callback on the second attempt #12

Open
aftoncreative opened this issue Jul 21, 2020 · 16 comments
Open

Comments

@aftoncreative
Copy link

I am testing the Sign in with Apple with Face ID facial recognition on.

The Sign in with Apple flow looks to be succesful but the callback is never fired on the first attempt.

After the second attempt, the Sign in With Apple-flow is once again successful and this time the callback is invoked normally.

Anyone else experiencing this issue? What could be the issue here?

@aftoncreative
Copy link
Author

Hi,

Update on this. The problem is actually not only the face ID, but the sign in flow in general.

When running locally, the login works normally with first attempt.

When running the app from test flight, the first attempt does not apparently invoke the success callback but second attempt does.

@AedonStorm
Copy link

I have the same issue. Running locally works but running from TestFlight does not launch the success callback.

@ryanmolley
Copy link

I’m also having this issue. Works fine locally but requires multiple attempts from TestFlight to launch success callback.

@sud80
Copy link

sud80 commented Aug 30, 2020

We are also facing similar issue where in the success or failure callbacks are randomly not getting invoked. The behaviour is such that the apple sign-in windows closes but the success / failure callback is not getting invoked. Happens in both scenarios when you successfully login or if you press cancel in the apple sign-in dialog. It is not consistent i.e. few times it succeeds and few times if fails.

Scenario:

Click on apple sign-in button
Sign-in Dialog opens
Click cancel or login
Sign-in Dialog closes.
Callback not getting invoked on all times. 1 out of 3 times it fails.
Again this behaviour is reproducible only in production build and not in simulator.

CLI: 6.7.4
tns-ios: 6.5.2
nativescript-apple-sign-in version: 1.1.0

@20051231
Copy link

20051231 commented Sep 1, 2020

I found the problem may be related to garbage collection of delegate variable.

let delegate: ASAuthorizationControllerDelegateImpl;

This variable may be removed by the minifier during production build. A simple fix is add export flag to it

@res0
Copy link

res0 commented Sep 4, 2020

I found the problem may be related to garbage collection of delegate variable.

let delegate: ASAuthorizationControllerDelegateImpl;

This variable may be removed by the minifier during production build. A simple fix is add export flag to it

@20051231 Hi, thanks for the find, can you please help us how to add the export flag to it?

@20051231
Copy link

20051231 commented Sep 4, 2020

I found the problem may be related to garbage collection of delegate variable.

let delegate: ASAuthorizationControllerDelegateImpl;

This variable may be removed by the minifier during production build. A simple fix is add export flag to it

@20051231 Hi, thanks for the find, can you please help us how to add the export flag to it?

should be enough to change this line.
export let delegate: ASAuthorizationControllerDelegateImpl;

I did not build the project but I just modify the npm package to test it.

@ryanmolley
Copy link

I found the problem may be related to garbage collection of delegate variable.

let delegate: ASAuthorizationControllerDelegateImpl;

This variable may be removed by the minifier during production build. A simple fix is add export flag to it

@20051231 Hi, thanks for the find, can you please help us how to add the export flag to it?

should be enough to change this line.
export let delegate: ASAuthorizationControllerDelegateImpl;

I did not build the project but I just modify the npm package to test it.

I have done a build and tested in TestFlight. I can validate that this fix works.

@imiskuf
Copy link

imiskuf commented Sep 8, 2020

I made a PR #15 with the delegate export.

It can take some time until it gets merged so meanwhile you can try to use my package which contains the change.

https://www.npmjs.com/package/@hifox/nativescript-apple-sign-in

@Trottero
Copy link

@EddyVerbruggen Old issue but is there any chance you could take a look at the PR highlighted above?

@konradkluzniak
Copy link

konradkluzniak commented Jun 28, 2022

@EddyVerbruggen this is blocker, Apple will not allow me to release the app because this feature must work, i must have user name and email and this plugin shows this data only once. Please resolve if you can. Thanks a lot.

@res0
Copy link

res0 commented Jun 28, 2022

@konradkluzniak unfortunately, this is how the apple sign in works :( they only return the e-mail on the first run (that's where you have to create an account on your side and link it with the apple id)
https://developer.apple.com/forums/thread/121496

@konradkluzniak
Copy link

Thanks @res0 , so does it mean that i can only have this data ONCE, and never again i can check it using any token or something ? The thing is, if you login with apple this data is saved in https://appleid.apple.com/. Only one way to see this data again is to login at https://appleid.apple.com/ and remove this app from stored logins. This will not work and apple submission guy will reject again. So how they do it in native iso apps ? Thanks.
Also, above we have a solution for this or am i wrong ? Cheers.

@res0
Copy link

res0 commented Jun 30, 2022

@konradkluzniak yeah, only once. I don't get that too, but it is what it is. :D When you get it the first time, you have to keep the data associated with the user ID

@konradkluzniak
Copy link

@konradkluzniak yeah, only once. I don't get that too, but it is what it is. :D When you get it the first time, you have to keep the data associated with the user ID

Thanks! But is user will uninstall the app , i eventually will loose this data...

@res0
Copy link

res0 commented Jun 30, 2022

@konradkluzniak that's why you need to keep it outside of the app, somewhere on your server.

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

No branches or pull requests

9 participants