-
Notifications
You must be signed in to change notification settings - Fork 1
Adding a logout button #28
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
Conversation
|
I have no idea why the entire dash_pages is being shown as changed, but I will highlight the portions I modified. |
| html.Div( | ||
| dcc.Link( | ||
| dmc.Button( | ||
| "Logout", | ||
| leftSection=[DashIconify(icon="carbon:logout")], # Changed from leftIcon to leftSection | ||
| variant="filled", | ||
| color="red", | ||
| size="sm", | ||
| styles={'root': {'backgroundColor': '#dc2626', '&:hover': {'backgroundColor': '#b91c1c'}}} | ||
| ), | ||
| href="/auth/logout", | ||
| refresh=True | ||
| ) | ||
| ) | ||
| ] | ||
| ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added logout button here
| # Enable debug mode | ||
| app.debug = True | ||
| # app.debug = True | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
revert to johnny's implementation, forgot to change back when i was debugging my code
Added a logout button to invalidate the session and revoke access to the application, instantly sending the user back to the login page.
The logout button shows on both the Home page and the Movies page.
upon clicking the button, a flash message indicates to the user that they have been logged out.
