-
Notifications
You must be signed in to change notification settings - Fork 155
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
Don't show the login button if you're already logged in #159
Comments
@neonnero your second 2 items should be fully handled with either some existing changes or some changing coming in the next release. Your first request will still need to be looked at. |
Is this possible now?
At this time, I am using Gutenberg blocks to set display conditions for logged-in and logged-out users. But it'd be nice to have this as a native feature. Thanks Kind regards, |
The second two items already exist with the short code. Not showing the button when logged in is something I don't believe has been implemented yet. |
CSS solution/workaroundActually, this can be achieved by just CSS (see this answer and WordPress documentation for more details), because the [openid_connect_generic_login_button button_text="Login"]
<a class="oidc-login-link" href="[openid_connect_generic_auth_url]">Login</a>
<a class="oidc-logout-link" href="/wp-login.php?action=logout">Logout</a> body.logged-in .openid-connect-login-button,
body.logged-in .oidc-login-link,
body:not(.logged-in) .oidc-logout-link
{
display: none;
} Would something like this be sufficient for you @neonnero ? Shortcode optionHowever, I understand that option within the plugin would be nice for this. For example, shortcode option
Since the plugin supports end_session endpoint, we could create shortcode for the Logout button/url as well with the same option to define visibility. What do you think @timnolte ? (I have a working code for the login button.) |
I'd like to have additional options when using a separate login button ([openid_connect_generic_login_button]).
My suggestions:
Customize the button label textWhen using a separate login button (using a shortcode), enable that the user can be redirected back to the page they were on after logging inThis could also be extended to a post/page general options, for articles/pages where login may be required to show the full text.
The text was updated successfully, but these errors were encountered: