Open LeonardoDB opened 2 years ago
@LeonardoDB You can pass your additional parameters to URL using getAuthorizationUrl()
function.
Ex.:
$oauthClient = new \League\OAuth2\Client\Provider\GenericProvider([
'clientId' => config('azure.appId'),
'clientSecret' => config('azure.appSecret'),
'redirectUri' => config('azure.redirectUri'),
'urlAuthorize' => config('azure.authority') . config('azure.authorizeEndpoint'),
'urlAccessToken' => config('azure.authority') . config('azure.tokenEndpoint'),
'urlResourceOwnerDetails' => '',
'scopes' => config('azure.scopes'),
'prompt' => 'consent'
]);
$authUrl = $oauthClient->getAuthorizationUrl(['prompt' => 'select_account']);
in above code, I am passing 'prompt' parameter to url.
hello,
I can add additional params to authorizationUrl using the library API?
I couldn't add this error=true, I think the lib doesn't allow adding new parameters inside the GenericProvider to be automatically added to url authorizationUrl, for example: https://my-authentication/login?error=true.......
Which option would be better?