Skip to content

Commit

Permalink
fix: adding exlicit cachelocation for bypassing adblockers
Browse files Browse the repository at this point in the history
  • Loading branch information
panvourtsis committed Aug 21, 2023
1 parent 1db322c commit c088efb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions __mocks__/@auth0/auth0-spa-js.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ export const createAuth0 = jest.fn().mockImplementation((options: any) =>
organization: undefined,
},
useRefreshTokensFallback: true,
useRefreshTokens: true,
})
);

Expand Down
7 changes: 4 additions & 3 deletions src/authentication/context.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import createAuth0Client, {
Auth0Client,
Auth0ClientOptions,
GetTokenSilentlyOptions,
RedirectLoginOptions,
Auth0ClientOptions,
Auth0Client,
} from '@auth0/auth0-spa-js';
import jwt_decode from 'jwt-decode';
import React, { useState, useEffect, createContext } from 'react';
import React, { createContext, useEffect, useState } from 'react';
import { useErrorHandler } from 'react-error-boundary';

import useOrganization from '../store/useOrganization';
Expand All @@ -28,6 +28,7 @@ const providerConfig: Auth0ClientOptions = {
redirect_uri: window.location.origin,
onRedirectCallback,
useRefreshTokens: true,
cacheLocation: 'localstorage',
};

export const defaultContextValues: AuthenticationContextProps = {
Expand Down

0 comments on commit c088efb

Please sign in to comment.