Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

App fails to logout with access_token in url #32

Closed
givensuman opened this issue Jul 10, 2021 · 0 comments
Closed

App fails to logout with access_token in url #32

givensuman opened this issue Jul 10, 2021 · 0 comments

Comments

@givensuman
Copy link

After logging in, the user is brought to the <Profile /> component and the url is set to something like https://spotify-profile.herokuapp.com/#access_token=BQBkftL1q6csOOMYZojUD...

Hitting 'Logout' from here refreshes the page with the profile still loaded. To get around this, one can navigate to any page and back to their profile to have the url reset without the access_token query present. When it's gone, the Logout button works again.

I think it's because in the server's index.js there is:

 res.redirect(
            `${FRONTEND_URI}/#${querystring.stringify({
              access_token,
              refresh_token,
            })}`,
          );

and the only path back to / is in the Nav.js component:

<NavLink to="/">
    <IconUser />
    <div>Profile</div>
</NavLink>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant