-
Notifications
You must be signed in to change notification settings - Fork 0
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
ncvescera
wants to merge
5
commits into
main
Choose a base branch
from
fix/logout
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
Maybe using the Flask # 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('/') |
Set @app.route('/login')
def login():
# Add 'max_age' in the params for the OIDC request
redirect_uri = url_for('auth_callback', _external=True)
return oauth.my_oidc.authorize_redirect(
redirect_uri,
params={
'max_age': 3600, # Maximum session age in seconds (e.g., 1 hour)
'prompt': 'login' # Force re-authentication
}
)
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.