-
Notifications
You must be signed in to change notification settings - Fork 290
Closed
Description
Describe the problem you'd like to have solved
Right now you can't access Auth0Client instance outside of React.
Valid use case for this is calling logout() from redux-saga or axios (in response to 403 from backend for example).
Another use case is storing token in redux and accessing it in redux-saga/whatever without hacks like this:
useAsyncEffect(
async isMounted => {
const token = await getAccessTokenSilently();
if (!isMounted) {
return;
}
dispatch(updateAuthToken(token));
},
[getAccessTokenSilently]
);
A clear and concise description of what you want to happen.
const client = new Auth0Client(...);
render(
<Auth0Provider client={auth0client}>...<Auth0Provider />
);
// Outside of component
client.logout();
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels