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

Feature: Allow only one provider #46

Open
an-ant0ni0 opened this issue May 19, 2022 · 4 comments
Open

Feature: Allow only one provider #46

an-ant0ni0 opened this issue May 19, 2022 · 4 comments

Comments

@an-ant0ni0
Copy link

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.

@mahagr
Copy link
Contributor

mahagr commented May 20, 2022

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..?

@an-ant0ni0
Copy link
Author

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?

@mahagr
Copy link
Contributor

mahagr commented May 20, 2022

Maybe help us to understand what you want by providing an image / screenshot?

@an-ant0ni0
Copy link
Author

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.
image
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.

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