Skip to content

Commit

Permalink
chore: delete unused state in Authentication provider (#127)
Browse files Browse the repository at this point in the history
## Description

<!-- Write and explain of the changes introduced by this PR for the reviewers to fully understand -->

## Screenshot

<!-- Provide a screenshot or gif of the change to demonstrate it -->

## Test Plan

<!-- Explain what you tested and why -->

<!--
  Have any questions? Check out the contributing doc for more
-->
  • Loading branch information
mkarajohn authored Mar 13, 2024
2 parents 80df1bf + 341dbeb commit e96a991
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions src/providers/Authentication.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import {
Auth0Client,
type Auth0ClientOptions,
type GetTokenSilentlyOptions,
type RedirectLoginOptions,
Expand All @@ -19,7 +18,6 @@ type AuthenticationProps = { children: ReactNode; overrides?: Auth0ClientOptions
export function Authentication({ children }: AuthenticationProps) {
const [isAuthenticated, setIsAuthenticated] = useState(false);
const [user, setUser] = useState<Record<string, unknown>>();
const [auth0Client, setAuth0Client] = useState<Auth0Client>();
const [isLoading, setIsLoading] = useState(true);
const [permissions, setPermissions] = useState<Permissions>([]);

Expand Down Expand Up @@ -70,7 +68,6 @@ export function Authentication({ children }: AuthenticationProps) {
(async () => {
try {
const client = await getAuth0Client();
setAuth0Client(client);
if (window.location.search.includes('code=')) {
const { appState } = await client.handleRedirectCallback();
onRedirectCallback(appState);
Expand Down

0 comments on commit e96a991

Please sign in to comment.