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 8f14b89 commit 003afa6
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/auth0-provider-with-navigate.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +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 onRedirectCallback = (appState) => {
navigate(appState?.returnTo || window.location.pathname);
Expand All @@ -25,9 +24,11 @@ export const Auth0ProviderWithNavigate = ({ children }) => {
clientId={clientId}
authorizationParams={{
redirect_uri: redirectUri,
scope: ''
scope: '',
resource: resource
}}
onRedirectCallback={onRedirectCallback}
useCookiesForTransactions={true}
>
{children}
</Auth0Provider>
Expand Down

0 comments on commit 003afa6

Please sign in to comment.