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

URI in RedirectURI isn't accepted #161

Open
AliveDevil opened this issue Oct 2, 2024 · 0 comments
Open

URI in RedirectURI isn't accepted #161

AliveDevil opened this issue Oct 2, 2024 · 0 comments

Comments

@AliveDevil
Copy link

When configuring the OAuth component with a redirect URI, instead of a redirect URL, the authentication fails with invalid or missing redirect_uri, which in the context of a redirect URI - instead of a redirect URL - is wrong.

As the name suggests, one can use redirect URIs (i.e. protocol:action), which is just as valid as a redirect URL with protocol://authority.

Been redirected here from ownCloud/ocis, as it is used in the Embedded Identity Provider there.
Checking https://github.com/libregraph/lico/blob/master/oidc/payload/authentication.go#L335-L337, leads to the main culprit: As a URL is a URI, you only need to check for RedirectURI and Protocol being set. The host-component is part of a URL, which not every URI has.
When enforcing redirect URIs to be URLs all other forms of URIs are excluded (i.e. urn:, x-custom-protocol:action, etc.).

Also: owncloud/ocis#10159

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

1 participant