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

added support for registrations endpoint #449

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

burnes
Copy link

@burnes burnes commented Sep 12, 2022

Some OAuth providers provide an endpoint for a registration page instead of a login page. By configuring the registrations_path and registrations_endpoint, the openidc_authorize function will redirect to the configured endpoint including the same parameters as the authorization endpoint and prepare the session.

Can be used e.g. for providing direct Links to Keycloak's registration page.

Some OAuth providers provide an endpoint for a registration page instead of a login page. By configuring the `registrations_path` and `registrations_endpoint`, the `openidc_authorize` function will redirect to the configured endpoint including the same parameters as the authorization endpoint and prepare the session.

Can be used e.g. for providing direct Links to Keycloak's registration page.
@burnes
Copy link
Author

burnes commented Sep 13, 2022

@zandbelt Could you please take a look at this?

@zandbelt
Copy link
Contributor

I don't see why this should be part of lua-resty-openidc. One could just as well provide the registration link of the provider directly to the user instead of redirecting through the path on the RP, isn't it?

@burnes
Copy link
Author

burnes commented Sep 13, 2022

@zandbelt To have a working link (and backlink), the session must be created and the state/redirect URL etc. must be appended to the registrations URL. At least in my use-case for Keycloak. If I want to do it outside of the library I have to duplicate a lot of code from the library as all the helper methods are private. Thought this could also help others.

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

Successfully merging this pull request may close these issues.

None yet

2 participants