Allow configuring multiple OAuth clients in the same realm #53
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What this does:
Allows different auth portals to use different OAuth clients with the same realm from the same identity provider. See greenpau/caddy-security/issues/307
Why do this:
Currently when multiple sites share an identity provider (eg. Google) with different client IDs they each need to specify a unique realm even though the sites are otherwise unrelated. As the realm forms part of the URL for OAuth callbacks this impacts external configuration as well, requiring clients to allow callbacks to eg.
site1.com/oauth/google1
,site2.com/oauth/google2
, etc. instead of justsite1.com/oauth/google
,site2.com/oauth/google
, etc.. Decoupling the otherwise unrelated configurations simplifies maintenance and set up when using multiple OAuth clients.What this does not do:
Permit multiple instances of the same identity provider (Google, fb, etc.) within a portal configuration.
How it does this:
Removes requirement for unique realms across all identity providers during initialization.