Skip to content

fix(ios): bump Auth0.swift to 3.3.1 to finish token refresh in background - #1738

Merged
subhankarmaiti merged 2 commits into
masterfrom
fix/ios-bump-auth0-swift-3.3.1
Nov 13, 2026
Merged

subhankarmaiti merged 2 commits into
masterfrom
fix/ios-bump-auth0-swift-3.3.1

Conversation

@subhankarmaiti

@subhankarmaiti subhankarmaiti commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Changes

Bumps Auth0.swift from 3.3.0 to 3.3.1. The new release fixes one cause of #1374, where users get logged out with "reused refresh token detected".

With refresh token rotation, Auth0 rotates the refresh token as soon as it handles the exchange. If iOS suspends the app before the response is stored, the keychain keeps the old refresh token. Once the rotation overlap passes, the next renewal sends that old token, reuse detection revokes the token family, and the user has to log in again. 3.3.1 runs each refresh token exchange inside a UIKit background task, so the app keeps running until the new credentials are stored.

 credentialsManager.credentials / renew / apiCredentials / ssoCredentials
+  beginBackgroundTask
     renew(withRefreshToken:)
     store(credentials)
+  endBackgroundTask

NativeBridge.swift already goes through those four Credentials Manager calls for getCredentials, getApiCredentials and getSSOCredentials, so no bridge changes are needed. 3.3.1 also stores rotated credentials before it returns a largeMinTTL error, so that error no longer drops the new refresh token.

  • spm/Package.swift: pin bumped to 3.3.1
  • A0Auth0.podspec: synced with scripts/sync-ios-deps.sh
  • README.md, EXAMPLES.md: version text updated

There's no public API change and the stored credential format doesn't change. Reverting is just pinning back to 3.3.0. Only iOS apps are affected, and the main side effect is that the app can stay alive in the background for a few extra seconds while a refresh is in flight. Android has no equivalent fix yet, so this doesn't close #1374 on Android.

References

Testing

This is a dependency bump only. The new behaviour is covered by Auth0.swift's own tests and by the device A/B test in auth0/Auth0.swift#1321. To check it here: run pod install in example/ios, sign in, expire the access token, call getCredentials(), and background the app right away. The renewal should complete and the new refresh token should be stored.

  • This change adds unit test coverage
  • This change has been tested on the latest version of the platform/language or why not

Checklist

@subhankarmaiti
subhankarmaiti requested a review from a team as a code owner November 13, 2026 09:21
@coderabbitai

coderabbitai Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Summary

Summary by CodeRabbit

  • Chores
    • Updated the iOS Auth0 integration to version 3.3.1.
  • Documentation
    • Updated the iOS setup guidance to reflect the current Auth0 version. Other documented versions and linkage instructions remain unchanged.

The iOS Auth0.swift dependency version changes from 3.3.0 to 3.3.1 in the Swift Package and podspec pins, and in the README and examples documentation.

Changes: Auth0.swift version update

Layer / File(s) Summary
Update Auth0.swift version pin and documentation
spm/Package.swift, A0Auth0.podspec, README.md, EXAMPLES.md
The exact Auth0.swift dependency pins and the documented iOS dependency version change from 3.3.0 to 3.3.1. Other listed dependencies remain unchanged.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix · Severity of issue fixed: Medium

Possibly related PRs

Suggested reviewers: utkrishtsahu, pmathew92

Merge Risk: Minimal · up to 1316a

This updates the iOS Auth0 dependency to a patch release that targets refresh-token rotation failures after app suspension. The manifest, podspec and docs agree on the version. No concrete merge-blocking risk was found, though running pod install and a background refresh check on iOS is a sensible smoke test.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: bumping the Auth0.swift dependency from 3.3.0 to 3.3.1 on iOS. It also states the purpose, finishing token refresh in the background. The changeset matches this. It is…
Description check Passed The description matches the changeset. It explains the Auth0.swift bump from 3.3.0 to 3.3.1 and the refresh-token rotation issue behind #1374. It lists the changed files (spm/Package.swift, A0Auth0.po…
Linked Issues check Passed Issue #1374 reports iOS users logged out after "reused refresh token detected". Its only coding requirement is to address that logout problem. The PR changes the Auth0.swift pin from 3.3.0 to 3.3.1 in…
Out of Scope Changes check Passed All four changed files contain only Auth0.swift version updates: spm/Package.swift pin, A0Auth0.podspec pin, and version text in README.md and EXAMPLES.md. These changes match the stated objective. No…
Full details: Title check

Explanation

The title names the main change: bumping the Auth0.swift dependency from 3.3.0 to 3.3.1 on iOS. It also states the purpose, finishing token refresh in the background. The changeset matches this. It is a version bump across spm/Package.swift, A0Auth0.podspec, README.md and EXAMPLES.md.

Full details: Description check

Explanation

The description matches the changeset. It explains the Auth0.swift bump from 3.3.0 to 3.3.1 and the refresh-token rotation issue behind #1374. It lists the changed files (spm/Package.swift, A0Auth0.podspec, README.md, EXAMPLES.md). It also gives testing steps and the iOS-only scope.

Full details: Linked Issues check

Explanation

Issue #1374 reports iOS users logged out after "reused refresh token detected". Its only coding requirement is to address that logout problem. The PR changes the Auth0.swift pin from 3.3.0 to 3.3.1 in spm/Package.swift and A0Auth0.podspec (both now 3.3.1, consistent with each other). The PR states that 3.3.1 runs refresh exchanges in a background task and stores rotated credentials before returning largeMinTTL. Those upstream behaviors are in the Auth0.swift release and are not present in this repository, so this assessment relies on the PR description for them. The change targets an iOS cause of #1374. The PR states it does not close the issue for Android, so #1374 stays open. No automated test is added in this repository. The PR relies on upstream tests and a manual device check.

Full details: Out of Scope Changes check

Explanation

All four changed files contain only Auth0.swift version updates: spm/Package.swift pin, A0Auth0.podspec pin, and version text in README.md and EXAMPLES.md. These changes match the stated objective. No unrelated code or configuration changes appear in the diff. The podspec pin matches the Package.swift pin, as scripts/sync-ios-deps.sh requires. The NativeBridge.swift change was not made, which the PR states is intended.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 572b83b and 1316a60.

Files selected for processing: 4

  • A0Auth0.podspec
  • EXAMPLES.md
  • README.md
  • spm/Package.swift

Included review availability: This review used your included allowance. 7 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 8 reviews per hour.

@subhankarmaiti
subhankarmaiti merged commit 9c69ac4 into master Nov 13, 2026
7 checks passed
@subhankarmaiti
subhankarmaiti deleted the fix/ios-bump-auth0-swift-3.3.1 branch November 13, 2026 09:27
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

Successfully merging this pull request may close these issues.

Users getting logged out with "Unsuccessful Refresh Token exchange, reused refresh token detected"

2 participants