Skip to content

Commit

Permalink
fix(web): removing token from url bar for security purposes
Browse files Browse the repository at this point in the history
  • Loading branch information
rallieon committed Oct 27, 2021
1 parent e6655db commit 73c3dd1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/web/src/api/hasteClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,9 @@ export class HasteClient {
}
} else if (idToken) {
this.ls.set('haste:config', idToken);
urlSearchParams.delete('id_token');
const plainUrl = window.location.href.split('?')[0];
window.history.pushState({}, document.title, `${plainUrl}${urlSearchParams.toString()}`);
return {
token: idToken,
isAuthenticated: true,
Expand Down

0 comments on commit 73c3dd1

Please sign in to comment.