Auth0.swift: The credentials renewal failed. CAUSE: Unknown or invalid refresh token.

Checklist

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

  1. Background the app for a long period
  2. App goes to the foreground
  3. We ask for biometrics
  4. If successful, call credentialsManager.credentials(minTTL: 60)
  5. 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)

Most upvoted comments

@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 warning CredentialsManager: 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'