Login flow can get stuck with transactionActiveAlready
#1027
Labels
bug
This points to a verified bug in the code
transactionActiveAlready
#1027
Checklist
Description
On iOS, using ASWebAuthenticationSession, the login flow sometimes gets "stuck." Attempting to start a new login session results in
[Error: Failed to start this transaction, as there is an active transaction at the moment.]
This happens when an error occurs during login, or the browser is closed before completing the login flow.
There is a workaround for the Swift library detailed here: https://github.com/auth0/Auth0.swift/blob/master/FAQ.md#5-how-to-resolve-the-failed-to-start-this-transaction-as-there-is-an-active-transaction-at-the-moment-error
How can I do the equivalent of
WebAuthentication.cancel()
from my React Native App?Reproduction
const credentials = await auth0.webAuth.authorize({...})
Attempt auth against an IdP that does not have the correct redirect URLs configured (this was my scenario, but there may be other ways to repro)
After the failure, try starting another login flow. The error
[Error: Failed to start this transaction, as there is an active transaction at the moment.]
will be raised.Additional context
No response
react-native-auth0 version
4.0.0
React Native version
0.76.5
Expo version
52.0.23
Platform
iOS
Platform version(s)
18.2
The text was updated successfully, but these errors were encountered: