Skip to content

Instantly share code, notes, and snippets.

@joshcanhelp
Created November 1, 2019 22:28
Show Gist options
  • Save joshcanhelp/7abfd2571e206a5f3e4436f925549428 to your computer and use it in GitHub Desktop.
Save joshcanhelp/7abfd2571e206a5f3e4436f925549428 to your computer and use it in GitHub Desktop.
Add another callback URL to the WP-Auth0 plugin
<?php
function namespace_add_auth0_callback_rewrite() {
add_rewrite_rule('^auth0/callback$', 'index.php?auth0=1', 'top');
}
add_action('init', 'namespace_add_auth0_callback_rewrite');
function namespace_add_auth0_callback_param( $params ) {
$params['redirect_uri'] = home_url( '/auth0/callback' );
return $params;
}
add_filter( 'auth0_authorize_url_params', 'namespace_add_auth0_callback_param' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment