mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-11-27 10:42:38 +01:00
Stop sending scope on the authorization code token request (#579)
This commit is contained in:
1 parent
33f32cccf6
commit
569f552d79
2 files changed
+100
-1
No files matched your search
@@ -31,7 +31,13 @@ export async function fetchAccessToken(
|
||||
],
|
||||
};
|
||||
|
||||
if (scope) httpRequest.body?.form.push({ name: "scope", value: scope });
|
||||
// RFC 6749 §4.1.3 doesn't define scope for the authorization code token
|
||||
// request, so strict servers (OpenIddict) reject it outright. Scope belongs on
|
||||
// the authorize request, which already sends it. Every other grant does define
|
||||
// it: §4.3.2 password, §4.4.2 client credentials, §6 refresh.
|
||||
if (scope && grantType !== "authorization_code") {
|
||||
httpRequest.body?.form.push({ name: "scope", value: scope });
|
||||
}
|
||||
if (audience) httpRequest.body?.form.push({ name: "audience", value: audience });
|
||||
|
||||
if ("clientAssertion" in args) {
|
||||
|
||||
Reference in new issue
Block a user