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

🐛 (src/): fix logout function #33

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft

🐛 (src/): fix logout function #33

wants to merge 5 commits into from

Conversation

ncvescera
Copy link
Member

@ncvescera ncvescera commented Nov 14, 2024

These changes should allow for a correct user disconnection, both when they use the 'logout' button and when they close the browser. Once disconnected, the user should be forced to also disconnect automatically from Vault.

Fixed a problem with the 'Start Computing' button (#32), it's now displayed on screen correctly.

Used the 'clear' method to empty the Flask session.
Updated the Vault endpoint path to revoke token.
These changes should allow for cleaning the Flask session when the browser is closed
and performing a logout from Vault.
Added a GET request after the flask cleaning session function.
This should force Vault to logout user.
Now the "start computing" button is displayed in the correct position.
@ncvescera ncvescera linked an issue Nov 15, 2024 that may be closed by this pull request
@ncvescera
Copy link
Member Author

Maybe using the Flask redirect function to visit the Vault's logout url should work !

    # Revoke the Vault token - We can't Batch token cannot be revoked
    # Redirect the user to the identity provider logout URL
    redirect('http://10.9.245.2:8200/ui/vault/logout')
    # Clear session or cookies
    session.clear()
    return redirect('/')

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

Successfully merging this pull request may close these issues.

"Start computing" button UI problem
1 participant