grav-plugin-login-oauth2
grav-plugin-login-oauth2 copied to clipboard
Feature: Allow only one provider
We have the use case where only a single provider is needed. We want to skip the provider's button and directly redirect to the provider.
We have added an option to change the flow without the post form in our own code and could provide an PR.
Is this a welcomed option for this plugin? Please, let me know.
You still need the button for that provider to let the users know what provider will be used to login. I think that the current approach is the best choice, though I don't think it's hard to create your own button which has already selected the provider.
I think that a template to this button (with a template param to pick up the option) would be a welcomed option.
PS. you still need the form to login, but it could be formatted as a single button..?
We use a self hosted keycloak instance as identity provider together with the login-oauth2-extras plugin and do not let the user choose. With an option we set the provider to keycloak
and do not need a login form in grav at all but redirect to the login form of keycloak.
So maybe this is a very special use case where only a single provider is required. Maybe others are interested in this?
Maybe help us to understand what you want by providing an image / screenshot?
Thanks for your patience.
A screenshot is not so easy because there are just redirects. On our grav homepage is a link to an internal site (with access.site.login: true
). We do not redirect to the login form but directly to keycloak where the keycloak login form is shown.
After login, keycloak redirect to the internal grav page.
In short:
grav.example.com --> keycloak.example.com/realms/x/protocol/openid-connect/auth/... --> grav.example.com/internal-page
Hope this helps to understand our case.