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

Provide new filter for alternate_redirect_uri #286

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

daggerhart
Copy link
Collaborator

This is currently untested. Just a starting point.

All Submissions:

Changes proposed in this Pull Request:

Provide a new filter for the alternate_redirect_uri for cases where the hardcoded value may not work. See #285

How to test the changes in this Pull Request:

  1. On the plugin settings page, enable the "Alternate Redirect URI" option.
  2. Write a custom hook in another plugin that changes the alternate redirect uri.
  3. Flush permalinks by visiting the site's permalink page.
  4. Test by performing normal OIDC login.

Generic example:

add_filter( 'openid-connect-generic-alter-alternate-redirect-uri', function( $redirect_uri ) {
  // No preceeding or trailing slash.
  return 'whatever-i-want-the-redirect-uri-to-be';
} );

Example specific to #285 :

add_filter( 'openid-connect-generic-alter-alternate-redirect-uri', function( $redirect_uri ) {
  // No preceeding or trailing slash.
  return 'ithemesfd/openid-connect-authorize';
} );

Changelog entry

Provide new filter for alternate_redirect_uri. Filter: openid-connect-generic-alter-alternate-redirect-uri.

@daggerhart daggerhart force-pushed the filter-alternate-redirect-uri branch from 760a7f5 to f1e1029 Compare April 2, 2021 12:08
@timnolte timnolte added the status: needs review PR that needs review. label Apr 11, 2021
@timnolte timnolte self-assigned this Apr 11, 2021
@timnolte
Copy link
Collaborator

@daggerhart should we update the description of the "Alternate Redirect URI" settings section to mention the availability of the new filter? Also we need to make sure to update the Hooks & Filters Wiki documentation.

@timnolte timnolte added the documentation Issues related to documentation changes or fixes. label Apr 11, 2021
Copy link
Collaborator

@timnolte timnolte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@daggerhart FYI, can we address my notes on this comment(#286 (comment)) and then we can get this merged in?

@Leobaillard
Copy link

This would be really useful, can it be merged?

@timnolte timnolte deleted the branch develop December 23, 2023 00:56
@timnolte timnolte closed this Dec 23, 2023
@timnolte timnolte reopened this Dec 23, 2023
@timnolte timnolte changed the base branch from dev to develop December 23, 2023 01:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Issues related to documentation changes or fixes. status: needs review PR that needs review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants