Created
November 1, 2019 22:28
-
-
Save joshcanhelp/7abfd2571e206a5f3e4436f925549428 to your computer and use it in GitHub Desktop.
Add another callback URL to the WP-Auth0 plugin
This file contains 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
<?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