mirror of
https://github.com/pocket-id/pocket-id.git
synced 2025-12-09 23:02:59 +03:00
🚀 Feature: Auto detect and populate callback URL #220
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @mitchplze on GitHub.
Feature description
Request is to provide the option to automatically detect and populate the
Callback URLwhen the field is left blank during initial OIDC client setup (or via checkmark/other mechanism).This concept is borrowed from authentik:
For this field:
Pitch
Depending on the client application and their documentation, it is often difficult to identify the exact callback URL for optimal security, while still allowing SSO with Pocket ID to work.
Sometimes callback URLs are randomly generated by the application, and not immediately apparent until the first authorization attempt.
With this feature, the first app to 'try' the OIDC connection after initially setting it up in Pocket - will win - and populate the client with the proper value.
Auto detecting this value is inherently more secure than using wildcards (where possible).
Potential challenge: the callback URL does not currently appear to be logged / visible in the UI.
@kmanwar89 commented on GitHub:
Threw my upvote into the ring here -- what I noticed is you can't create the app until the callback is provided, but some apps don't provide you the callback until the IdP is configured, so it becomes chicken/egg.
I got around this by using a placeholder value (testing.whatever.com), filled out the remaining values in my client, then came back to override the callback URL once I had the true values.
@ItalyPaleAle commented on GitHub:
The error just says
Invalid callback URL, it might be necessary for an admin to fix this. I'm suggesting expanding to something like:So the user has all the context they need to fix the issue.
@kmendell commented on GitHub:
An error is already thrown and showed if the callback url is not right, im confused on what you're suggesting by this.
@ItalyPaleAle commented on GitHub:
I like the suggestion of "TOFU" (Trust On First Use), but if the main problem is that the callback URL is sometimes hard to detect, how about we just show an error message saying
callback url https://example.com is invalid?@mitchplze commented on GitHub:
I'm not sure what causes the error y'all are talking about to be thrown in any case.
The box seems to accept anything:
EDIT: Ah, I see, when you actually try and login you mean with an incorrect URL.
Would be super handy to have that in the error, yes. Right now there is no way I'm aware of to get the callback URL in the UI.