mirror of
https://github.com/pocket-id/pocket-id.git
synced 2026-02-05 00:39:38 +03:00
🚀 Feature: Auto detect and populate callback URL #283
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 (May 17, 2025).
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.
@ItalyPaleAle commented on GitHub (May 19, 2025):
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?@kmendell commented on GitHub (May 19, 2025):
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 (May 19, 2025):
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.
@mitchplze commented on GitHub (May 19, 2025):
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.
@kmanwar89 commented on GitHub (May 26, 2025):
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.