Closed itaishalom closed 1 year ago
This my code:
Future<TokenResponse> test( String organization, List<String> promptValues) async { Completer temp = Completer(); final auth0Web = Auth0Web('my-domain', this._clientId); if (kIsWeb) { auth0Web.onLoad().then((final credentials) { if (credentials != null) { resp = TokenResponse( "accessToken", credentials!.refreshToken, null, credentials.idToken, "tokenType", scopes, {}); logger.i("resp is " + resp.toString()); temp.complete(); } else { logger.i("not logged in"); // Not logged in } }); } if (kIsWeb) { Map<String, String> parameters = {'prompt': 'login'}; await auth0Web.loginWithRedirect(redirectUrl: 'http://localhost:3000', organizationId: organization.isEmpty ? null:organization ,scopes: scopes.toSet(), parameters: parameters); } await temp.future; return resp!; }
This causes the app to loop when I run it on port 3000 (it's defined on our Auth0 page) The app restarts after the login with auth0 page. I guess the redirect works but the app restarts.
Above.
No response
1.2.1
3.10.3
Web
Hi @itaishalom, thanks for raising this.
Can you reproduce this in the sample app?
Closing due to inactivity. Please feel free to ping if you'd prefer to reopen.
Checklist
Description
This my code:
This causes the app to loop when I run it on port 3000 (it's defined on our Auth0 page) The app restarts after the login with auth0 page. I guess the redirect works but the app restarts.
Reproduction
Above.
Additional context
No response
auth0_flutter version
1.2.1
Flutter version
3.10.3
Platform
Web
Platform version(s)
No response