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

Is there a way to redirect a user to the login page other than trying to access a restricted page? #62

Open
jwag59 opened this issue Jun 22, 2022 · 1 comment

Comments

@jwag59
Copy link

jwag59 commented Jun 22, 2022

I'd like to have a button or Menu item that can be used to request login details.
What I have now is a Menu item as follows:
MenuItem('Login', '/login', icon="login"),
And then I define the login page as:

@app.page('/login', 'Login Page', auth_needed='user')
def nodes_view_page():
   return [Header('This is the login redirect page', 3)]

I also redirect users on Login to '/' so they never see the actual login page.
Of course this forces a login BUT it sends the 'No Permission' notification to the user ... which looks a bit strange if this is meant to simply be a link to a login prompt.
Is there a way to bypass the Notification and simply allow the user to login with their credentials?
Or even better, could there be an adminui app. option to enable the display of a 'Login' link on the top right of the 'top bar' if a user is not currently logged in, and if the user is logged in, it simply shows their login name (as it does now)?

@bigeyex
Copy link
Owner

bigeyex commented Jun 25, 2022

good point

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

No branches or pull requests

2 participants