Passing data to hosted login page from Auth0 Wordpress Plugin

Scenario: When using the Auth0 Wordpress plugin, and attempting to use the solution here to target a sign-up screen with a link: Passing data to the hosted login page: With Solution!, I found that this solution was imcomplete when using the plugin.

To modify the URL for the redirection, it’s necessary to use an Auth0/WP hook to intercept the redirect URL and modify it before it leaves Wordpress, as below:

/*
 * Filter to update the authorize_url to contain 'isSignup' when 'isSignup' is present in the 
 * wp-login URL, BEFORE it redirects to Auth0.
 */
function authorize_url($auth_url, $auth_params) {
  if ( !empty( $_GET['isSignup'] ) ) {
	$auth_url .= '&isSignup=true';
  }
  return $auth_url;
}
add_filter( 'auth0_authorize_url', 'authorize_url', 10, 2 );

Hope this helps someone. I knocked around for a few hours before I figured it out.