mirror of
https://github.com/hanzoai/openid-client.git
synced 2026-09-24 17:01:10 +00:00
refactor(passport): use the supportsPKCE() metadata helper
This commit is contained in:
+1
-3
@@ -242,9 +242,7 @@ export class Strategy implements passport.Strategy {
|
||||
redirectTo.searchParams.set('code_challenge_method', 'S256')
|
||||
|
||||
if (
|
||||
this._config
|
||||
.serverMetadata()
|
||||
.code_challenge_methods_supported?.includes('S256') !== true &&
|
||||
!this._config.serverMetadata().supportsPKCE() &&
|
||||
!redirectTo.searchParams.has('nonce')
|
||||
) {
|
||||
redirectTo.searchParams.set('state', client.randomState())
|
||||
|
||||
Reference in New Issue
Block a user