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:
@ -27,6 +27,8 @@ export const Auth0ProviderWithNavigate = ({ children }) => {
|
|||||||
audience: audience
|
audience: audience
|
||||||
}}
|
}}
|
||||||
onRedirectCallback={onRedirectCallback}
|
onRedirectCallback={onRedirectCallback}
|
||||||
|
useRefreshTokens={true}
|
||||||
|
cacheLocation="localstorage"
|
||||||
>
|
>
|
||||||
{children}
|
{children}
|
||||||
</Auth0Provider>
|
</Auth0Provider>
|
||||||
|
|||||||
@ -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",
|
||||||
|
|||||||
Reference in New Issue
Block a user