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

Enable user logout after routing to home #66

Open
minump opened this issue Nov 2, 2023 · 0 comments
Open

Enable user logout after routing to home #66

minump opened this issue Nov 2, 2023 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@minump
Copy link
Collaborator

minump commented Nov 2, 2023

User needs to have the option to logout after being routed to /home (Dashboard).
For now the logout functionality is implemented in express app where it uses csrf token passed along as FormData in the request. See server/routes/auth.js and server/views/home.ejs
However this csrf token is not being passed to the react app (all static files rendered by express) and hence user is unable to logout.

Possible solutions:

  1. Have the top menu bar in express app and have the react app be bound to a div that is below the menu bar :
    Now the react app is bound to "app" div. See https://github.com/clowder-framework/CONSORT-frontend/blob/main/src/index.ejs#L27. Have another div on top of the "app div", named "menu-bar". This will be rendered by the express app. The react app will be rendered below the "menu-bar" div.
  2. Use something else than "csrf token" to authenticate users in the react app
@minump minump self-assigned this Nov 2, 2023
@minump minump added the bug Something isn't working label Nov 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant