mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-04-17 14:29:46 +02:00
Add audience parameter to OAuth 2
Closes https://feedback.yaak.app/p/how-do-i-send-an-audience-using-oauth2
This commit is contained in:
@@ -6,6 +6,7 @@ export async function getAccessToken(
|
||||
ctx: Context, {
|
||||
accessTokenUrl,
|
||||
scope,
|
||||
audience,
|
||||
params,
|
||||
grantType,
|
||||
credentialsInBody,
|
||||
@@ -17,6 +18,7 @@ export async function getAccessToken(
|
||||
grantType: string;
|
||||
accessTokenUrl: string;
|
||||
scope: string | null;
|
||||
audience: string | null;
|
||||
credentialsInBody: boolean;
|
||||
params: HttpUrlParameter[];
|
||||
}): Promise<AccessTokenRawResponse> {
|
||||
@@ -39,6 +41,7 @@ export async function getAccessToken(
|
||||
};
|
||||
|
||||
if (scope) httpRequest.body!.form.push({ name: 'scope', value: scope });
|
||||
if (scope) httpRequest.body!.form.push({ name: 'audience', value: audience });
|
||||
|
||||
if (credentialsInBody) {
|
||||
httpRequest.body!.form.push({ name: 'client_id', value: clientId });
|
||||
|
||||
Reference in New Issue
Block a user