This is going to depend on how you configured the loginWithRedirect() function. As you can see in our react quickstart, we configure the function to call our auth0 sdk initialization, auth0Client
, with the .loginWithPopup
method.
const loginWithPopup = async (params = {}) => {
setPopupOpen(true);
try {
await auth0Client.loginWithPopup(params);
} catch (error) {
console.error(error);
} finally {
setPopupOpen(false);
}
const user = await auth0Client.getUser();
setUser(user);
setIsAuthenticated(true);
};
Either one is fine if you are comfortable sharing it! Here is my GitHub: https://github.com/IdentityDan