Skip to content

Conversation

@1ncipient
Copy link
Owner

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.

image
image

upon clicking the button, a flash message indicates to the user that they have been logged out.
image

@1ncipient 1ncipient requested review from JZhang0 and gglue December 8, 2024 01:42
@1ncipient 1ncipient self-assigned this Dec 8, 2024
@1ncipient
Copy link
Owner Author

I have no idea why the entire dash_pages is being shown as changed, but I will highlight the portions I modified.

Comment on lines +93 to +108
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
)
)
]
)
Copy link
Owner Author

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

Copy link
Owner Author

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

@1ncipient 1ncipient added the enhancement New feature or request label Dec 8, 2024
@1ncipient 1ncipient linked an issue Dec 8, 2024 that may be closed by this pull request
@1ncipient 1ncipient closed this Dec 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

Development

Successfully merging this pull request may close these issues.

2 participants