mirror of
https://github.com/kamranahmedse/developer-roadmap.git
synced 2025-10-02 20:06:44 +02:00
fix: user gets logged out on browser quit (#3947)
This commit is contained in:
@@ -59,7 +59,10 @@ export function GitHubButton(props: GitHubButtonProps) {
|
||||
|
||||
localStorage.removeItem(GITHUB_REDIRECT_AT);
|
||||
localStorage.removeItem(GITHUB_LAST_PAGE);
|
||||
Cookies.set(TOKEN_COOKIE_NAME, response.token);
|
||||
Cookies.set(TOKEN_COOKIE_NAME, response.token, {
|
||||
path: '/',
|
||||
expires: 30,
|
||||
});
|
||||
window.location.href = redirectUrl;
|
||||
})
|
||||
.catch((err) => {
|
||||
|
Reference in New Issue
Block a user