@@ -19,7 +19,6 @@ class OpenIDConnectClient extends \Jumbojett\OpenIDConnectClient
19
19
{
20
20
protected ?JweDecryptInterface $ jweDecrypter ;
21
21
protected ?OpenIDConfiguration $ openIDConfiguration ;
22
- protected ?string $ loginHint = null ;
23
22
24
23
public function __construct (
25
24
?string $ providerUrl = null ,
@@ -122,12 +121,11 @@ protected function getWellKnownConfigValue($param, $default = null): string|arra
122
121
*/
123
122
public function setLoginHint (?string $ loginHint = null ): void
124
123
{
125
- $ this ->loginHint = $ loginHint ;
124
+ $ this ->addAuthParam ([ ' login_hint ' => $ loginHint]) ;
126
125
}
127
126
128
127
/**
129
128
* Overwrite the redirect method to a redirect method of Laravel.
130
- * And add login_hint when redirecting to the authorization endpoint.
131
129
* Sometimes the error 'Cannot modify header information - headers already sent' was thrown.
132
130
* By using HttpResponseException, laravel will return the given response.
133
131
* @param string $url
@@ -136,14 +134,6 @@ public function setLoginHint(?string $loginHint = null): void
136
134
*/
137
135
public function redirect ($ url ): void
138
136
{
139
- $ authorizationEndpoint = $ this ->getAuthorizationEndpoint ();
140
- if (
141
- !empty ($ this ->loginHint )
142
- && str_starts_with ($ url , $ authorizationEndpoint )
143
- ) {
144
- $ url .= "& " . http_build_query (['login_hint ' => $ this ->loginHint ]);
145
- }
146
-
147
137
throw new HttpResponseException (new RedirectResponse ($ url ));
148
138
}
149
139
0 commit comments