React-native-apple-authentication: Refresh operation forces user to login again

Created on 17 Jun 2020  路  7Comments  路  Source: invertase/react-native-apple-authentication

Running the below code opens the login popup and forces the user to re-enter their pin or face id. It does not refresh in background. Is this with Apple standards or a bug in the library?

appleAuth.performRequest({
  requestedOperation: AppleAuthRequestOperation.REFRESH,
  user: auser
})
waiting for feedback

Most helpful comment

Hi @mikehardy,
Is it possible to reopen this issue? We are facing exactly the same problem + we noticed that on real devices using requestedOperation: AppleAuthRequestOperation.REFRESH, results in empty email and fullName fields.

Versions info:

  • "@invertase/react-native-apple-authentication": "2.1.0"
  • "react-native": "0.63.4"

Tested on simulators - os versions: 13.7, 14.4 - and real devices (iPhone XS, iPhone SE) - os versions: 14.4, 14.3 respectively.

Please let me know if you need more details.

All 7 comments

Curious. Any more info?
Version info of everything? real device or simulator (definitely test on real device if it was simulator)?
Historically for questions like this the questioner is the questioner ends up having to resolve it - I don't think anyone is an expert yet on the APIs and we've not encountered this particular thing before

In the past searches on apple dev forums / a look at the related expo apple auth module, and/or hacking in some instrumentation on the underlying Obj-C code here and seeing what the API does has been the path to resolve

@steventnorris-40AU any further info on this re: the comment I left above?

@steventnorris-40AU did you manage to resolve this issue? We are facing the same thing

@tahasabih I have not. The issue became low priority and we simply accepted it as it was for now. This project hasn't resurfaced the need yet.

Hi @mikehardy,
Is it possible to reopen this issue? We are facing exactly the same problem + we noticed that on real devices using requestedOperation: AppleAuthRequestOperation.REFRESH, results in empty email and fullName fields.

Versions info:

  • "@invertase/react-native-apple-authentication": "2.1.0"
  • "react-native": "0.63.4"

Tested on simulators - os versions: 13.7, 14.4 - and real devices (iPhone XS, iPhone SE) - os versions: 14.4, 14.3 respectively.

Please let me know if you need more details.

I can reopen it but to set expectations if there is to fix you'll have to drive it via submission of a PR or it will sit. You can see the cide here vs the apple apis, there isn't a lot to it and it's my understanding we coded it to the docs

This is still happening. The REFRESH request prompts the user to sign in again.

How are people dealing with refreshing the token otherwise? Just persist the user token in local state and force the user to sign in if revoked?

Was this page helpful?
0 / 5 - 0 ratings