diff --git a/classes/class-pbs-passport-authenticate.php b/classes/class-pbs-passport-authenticate.php index 9a1f256..b429c64 100644 --- a/classes/class-pbs-passport-authenticate.php +++ b/classes/class-pbs-passport-authenticate.php @@ -191,8 +191,11 @@ public function get_pmsso_link($args = null) { $redirect_uri = ( !empty($args['redirect_uri']) ? $args['redirect_uri'] : site_url('pbsoauth/callback/') ); $client_id = ( !empty($args['client_id']) ? $args['client_id'] : $defaults['pmsso_client_id'] ); $customerid = ( !empty($args['customer_id']) ? $args['customer_id'] : $defaults['pmsso_customerid'] ); - $prompt = ( !empty($args['prompt']) ? $args['prompt'] : 'login' ); - $pmsso_url = "https://login.publicmediasignin.org/" . $customerid . "/login/authorize?client_id=" . $client_id . "&redirect_uri=" . $redirect_uri . "&scope=openid&response_type=code&prompt=" . $prompt; + $prompt = ( !empty($args['prompt']) ? $args['prompt'] : false); + $pmsso_url = "https://login.publicmediasignin.org/" . $customerid . "/login/authorize?client_id=" . $client_id . "&redirect_uri=" . $redirect_uri . "&scope=openid&response_type=code"; + if (!empty($prompt)) { + $pmsso_url .= "&prompt=" . $prompt; + } return $pmsso_url; }