detectUpgradeRedirect({ url })— a pure, synchronous check for whether the URL is a return from the upgrade app.completeUpgradeRedirect({ url }, client?)— reads the outcome, refreshes the session on success, and returns it (nullwhen there’s nothing to consume). The refresh is best-effort: the upgrade already succeeded on the backend, so a failed refresh still reportssuccessand reconciles on the next auth refresh.
window.location.href.
- TypeScript
- React
Handling errors
See also
- Upgrade overview — detection, hosting, and shared requirements
- Embed the app (iframe)
- Popup (new window)
- Going lower-level