Modified Auth0 integration to pull refresh token for auth and not hit Auth0 endpoints at every navigation page YABA-5

This commit is contained in:
2023-02-21 21:40:21 -06:00
parent 0065613cdd
commit 36058cb283
2 changed files with 4 additions and 2 deletions

View File

@ -27,6 +27,8 @@ export const Auth0ProviderWithNavigate = ({ children }) => {
audience: audience audience: audience
}} }}
onRedirectCallback={onRedirectCallback} onRedirectCallback={onRedirectCallback}
useRefreshTokens={true}
cacheLocation="localstorage"
> >
{children} {children}
</Auth0Provider> </Auth0Provider>

View File

@ -11,7 +11,7 @@ export function Header(props) {
const handleLogin = async () => { const handleLogin = async () => {
await loginWithRedirect({ await loginWithRedirect({
appState: { appState: {
returnTo: "/bookmarks", returnTo: "/",
}, },
}); });
}; };
@ -19,7 +19,7 @@ export function Header(props) {
const handleSignUp = async () => { const handleSignUp = async () => {
await loginWithRedirect({ await loginWithRedirect({
appState: { appState: {
returnTo: "/bookmarks", returnTo: "/",
}, },
authorizationParams: { authorizationParams: {
screen_hint: "signup", screen_hint: "signup",