Skip to content

Commit

Permalink
fix: Condition
Browse files Browse the repository at this point in the history
* Wrong way around.
  • Loading branch information
lukashaertel committed Sep 14, 2024
1 parent 89c97d2 commit fcb275f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/context/AuthContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ export const AuthContextProvider: FC<PropsWithChildren> = ({ children }) => {
const refreshTokenData = await SecureStore.getItemAsync("accessTokenData");
const refreshTokenConfig = refreshTokenData ? new TokenResponse(JSON.parse(refreshTokenData)) : null;

if (!refreshTokenConfig || TokenResponse.isTokenFresh(refreshTokenConfig, refreshMarginSeconds)) {
if (!refreshTokenConfig || !TokenResponse.isTokenFresh(refreshTokenConfig, refreshMarginSeconds)) {
// Refresh it.
const response = await refreshAsync(
{
Expand Down

0 comments on commit fcb275f

Please sign in to comment.