Skip to content

Commit

Permalink
fix: refactor redirect URI in App component
Browse files Browse the repository at this point in the history
  • Loading branch information
amalv committed Dec 26, 2023
1 parent c8879b0 commit fa4642e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,17 @@ const App = () => {
},
});

console.log("Redirect URI: ", window.location.origin);
const isProduction = process.env.NODE_ENV === "production";
const redirectUri = isProduction
? `${window.location.origin}/bukie`
: window.location.origin;

return (
<Auth0Provider
domain={import.meta.env.VITE_AUTH0_DOMAIN}
clientId={import.meta.env.VITE_AUTH0_CLIENT_ID}
authorizationParams={{
redirect_uri: window.location.origin,
redirect_uri: redirectUri,
}}
>
<ApolloProvider client={client}>
Expand Down

0 comments on commit fa4642e

Please sign in to comment.