Skip to content

Commit

Permalink
resource for api
Browse files Browse the repository at this point in the history
  • Loading branch information
ardiyu07 committed Aug 28, 2024
1 parent 003afa6 commit 3772ccf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/auth0-provider-with-navigate.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export const Auth0ProviderWithNavigate = ({ children }) => {
const domain = process.env.REACT_APP_LOGIN3_DOMAIN;
const clientId = process.env.REACT_APP_LOGIN3_CLIENT_ID;
const redirectUri = window.location.origin;
const resource = process.env.REACT_APP_LOGIN3_RESOURCE_API || process.env.REACT_APP_LOGIN3_CLIENT_ID;
const resource = process.env.REACT_APP_LOGIN3_RESOURCE_API || window.location.origin;

const onRedirectCallback = (appState) => {
navigate(appState?.returnTo || window.location.pathname);
Expand All @@ -28,6 +28,7 @@ export const Auth0ProviderWithNavigate = ({ children }) => {
resource: resource
}}
onRedirectCallback={onRedirectCallback}
useRefreshTokens={true}
useCookiesForTransactions={true}
>
{children}
Expand Down

0 comments on commit 3772ccf

Please sign in to comment.