Auth0.swift: The credentials renewal failed. CAUSE: Unknown or invalid refresh token.
Checklist
- The issue can be reproduced in the Auth0.swift sample app (or N/A).
- I have looked into the README, Examples, and FAQ and have not found a suitable solution or answer.
- I have looked into the API documentation and have not found a suitable solution or answer.
- I have searched the issues and have not found a suitable solution or answer.
- I have searched the Auth0 Community forums and have not found a suitable solution or answer.
- I agree to the terms within the Auth0 Code of Conduct.
Description
We are randomly getting this error when using credentialsManager.credentials(minTTL: 60)
On our logging system, it says that the error is coming from
CredentialsManager.retrieveCredentials(CredentialsManager.swift:355)
Reproduction
- Background the app for a long period
- App goes to the foreground
- We ask for biometrics
- If successful, call
credentialsManager.credentials(minTTL: 60)
- we get the error, but it happens randomly
Auth0.swift version
2.3.2
Platform
iOS
Platform version(s)
16.3.1
Xcode version
14.2
Package manager
SPM
About this issue
- Original URL
- State: closed
- Created a year ago
- Reactions: 1
- Comments: 23 (10 by maintainers)
@Widcket Ok so I checked this and for us, now it makes sense that the refresh token is invalid after the absolute expiration time and also we disabled inactivity expiration. Closing this issue
Hi @Widcket I haven’t been able to check this yet. I’ll let you know when I have this info
@abrandt38-mm I’m afraid that exceeds the scope of this issue and the SDK itself. I’d suggest contacting Auth0 support about it.
Hi, I just wanted to raise that we are getting the same issue, I used the debugging code @Widcket provided and seems like whenever
credentials(minTTL: ExpireyTime).authToken
is called after the ExpireyTime we get this warningCredentialsManager: The non-thread safe method 'store()' is being called from a different thread! It was first called from '<NSThread: 0x6000019ac300>{number = 2, name = (null)}' on queue 'com.apple.NSURLSession-delegate', now it's being called from '<NSThread: 0x6000019aab40>{number = 13, name = (null)}' on queue 'com.apple.NSURLSession-delegate'