Default allow_missing_nonce behavior

This commit is contained in:
Andy Dixon
2026-04-27 10:50:50 +01:00
parent 1d8578c1da
commit b2163ad996
5 changed files with 98 additions and 3 deletions
+10
View File
@@ -135,6 +135,16 @@ $result = $client->handleCallback($_GET, true, [
Use this only as a short-term bridge while the application is updated to persist and enforce nonce consistently.
If your provider returns an `id_token` without the `nonce` claim, the SDK will allow missing nonce values by default while still enforcing a match when one is present. You can also set it explicitly:
```php
$result = $client->handleCallback($_GET, true, [
'allow_missing_nonce' => true,
]);
```
Use this only after confirming the provider cannot include `nonce`, because it weakens replay protection for those tokens.
## 3. Single callback for multiple app roles
Using one OAuth client and one callback URL is recommended.