auth0 / react-native-auth0

React Native toolkit for Auth0 API
https://auth0.com
MIT License
488 stars 208 forks source link

How to change the `redirectURI` at runtime? #927

Open TPLCarloTaleon opened 3 months ago

TPLCarloTaleon commented 3 months ago

Checklist

Description

I have two environments that I want to try with Auth0 and interchange between them at runtime. So that PROD and DEV flags are runtime values.

  1. If PROD, point to au.example.com
  2. If DEV, point to jp.example.com

But whenever I call auth0.webAuth.authorize(...) using the two different credentials.

The first time it works, but when I switch to the other one, it still uses the same redirectURI but with some different credentials.

The modal pop-up still shows the same domain that I used the first time.

I'm not sure if it's caused by the iOS's webview? Or is it React Native? Or is it Auth0?

Reproduction

No repro. I'll try to make a minimal example in a while.

Additional context

No response

react-native-auth0 version

3.2.1

React Native version

0.74.1

Expo version

No response

Platform

iOS

Platform version(s)

17.5

NazmaD commented 15 hours ago

I am facing the same issue @TPLCarloTaleon were you able to resolve it