Skip to content

Commit 08bd60f

Browse files
committed
fix: Check if nonce is enabled
1 parent 6795c36 commit 08bd60f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Client.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ public function authenticate(): bool
217217
throw new ClientException('User did not authorize openid scope.');
218218
}
219219

220-
if (Session::get('oidc_nonce') !== $request->get('nonce')) {
220+
if ($this->enable_nonce && Session::get('oidc_nonce') !== $request->get('nonce')) {
221221
throw new ClientException("Generated nonce is not equal to the one returned by the server.");
222222
}
223223
Session::remove('oidc_nonce');

0 commit comments

Comments
 (0)