-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c0c2453
commit 8248853
Showing
4 changed files
with
6 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
.env | ||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
// utils/getRefreshToken.ts | ||
|
||
// Function to get the refresh token from localStorage | ||
export default function getRefreshToken(): string | boolean { | ||
export default function getRefreshToken(): string | null { | ||
const refreshToken = localStorage.getItem('refreshToken'); | ||
|
||
// Check if the refresh token is available and valid | ||
if (refreshToken !== undefined && refreshToken !== "" && refreshToken !== null) { | ||
return refreshToken; | ||
} else { | ||
return false; // Return null if the token is not available | ||
return null; // Return null if the token is not available | ||
} | ||
} |