-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Storage auth token vars in sessionStorage in online survey app
- Loading branch information
esurface
committed
Aug 1, 2024
1 parent
75cda62
commit 30b61d3
Showing
6 changed files
with
24 additions
and
24 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
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 |
---|---|---|
|
@@ -43,7 +43,7 @@ export class UserService { | |
} | ||
|
||
async getCurrentUser() { | ||
return await localStorage.getItem('user_id'); | ||
return await sessionStorage.getItem('user_id'); | ||
} | ||
private showError(error: any) { | ||
console.log(error); | ||
|
@@ -58,7 +58,7 @@ export class UserService { | |
|
||
async getMyUser() { | ||
try { | ||
if (localStorage.getItem('user_id') === 'user1') { | ||
if (sessionStorage.getItem('user_id') === 'user1') { | ||
return { | ||
email: '[email protected]', | ||
firstName: 'user1', | ||
|
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