feat: OAuth trailing slash variable#1163
Merged
JohnVillalovos merged 1 commit intoLibreBooking:developfrom Mar 23, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new OAuth2 configuration option to control whether a trailing slash on the configured authorize URL is preserved or trimmed when generating the login redirect URL.
Changes:
- Introduces
authentication.oauth2.trailing.slash(boolean) config key with defaultfalse. - Updates OAuth2 authorize URL construction in
LoginPresenter::GetOauth2Url()to conditionallyrtrim()the URL. - Documents the new setting in
config/config.dist.php.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| Presenters/LoginPresenter.php | Uses the new config flag to decide whether to trim a trailing slash from the OAuth2 authorize URL. |
| lib/Config/ConfigKeys.php | Defines the new AUTHENTICATION_OAUTH2_TRAILING_SLASH config key metadata. |
| config/config.dist.php | Adds the default oauth2.trailing.slash setting with an explanatory comment. |
You can also share your feedback on Copilot code review. Take the survey.
JohnVillalovos
requested changes
Mar 17, 2026
Collaborator
JohnVillalovos
left a comment
There was a problem hiding this comment.
Thanks @PVTGoesen
Looks good except for the name of the config option.
Collaborator
|
@PVTGoesen Any updates? |
JohnVillalovos
requested changes
Mar 22, 2026
JohnVillalovos
approved these changes
Mar 22, 2026
Collaborator
JohnVillalovos
left a comment
There was a problem hiding this comment.
Thanks @PVTGoesen
LGTM
7bf2c2c to
8948a77
Compare
JohnVillalovos
approved these changes
Mar 23, 2026
Collaborator
JohnVillalovos
left a comment
There was a problem hiding this comment.
Thanks @PVTGoesen
LGTM
8948a77 to
ec56c76
Compare
Adds a variable for OAuth, to keep the configured authorize URL's trailing slash Closes: LibreBooking#917
ec56c76 to
8e72ea2
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Some OAuth2 provider need a trailing slash in the authorization URL. This changes let you choose if you want to cut or keep the trailing slash in oauth2 authorize URL.