Hi,
We want to figure out a way to send data to our web app after a user logs in. Basically we want to trigger something on our web app right after a user successfully logs in. One potential solution that we thought about was to add a query parameter to the redirect uri where the user gets sent after successful login, and then use that to determine that a user just logged in.
Ex.
loginWithRedirect({
redirectUri: `http://localhost:3001/dashboard?justLoggedIn=true`,
});
or
<Auth0Provider
domain={AUTH0_DOMAIN}
clientId={AUTH0_CLIENT_ID}
redirectUri="http://localhost:3001/dashboard?justLoggedIn=true"
audience={AUTH0_API_AUDIENCE}>
We noticed that this was not possible because the query params gets removed once the user is redirected. Goes to http://localhost:3001/dashboard instead of http://localhost:3001/dashboard?name=auth.
Also looked into api.redirect.sendUserTo in auth0 action but we don’t want to temporary redirect the user and go back to auth0 to continue the workflow. Is there a suggested method for achieving this? or are we doing something wrong?