Skip to content

Commit 7629fa4

Browse files
fix: Allow Auidences other than Live
1 parent f0c2e3b commit 7629fa4

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/authenticationManager.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export type AuthenticationOptions = {
2323
/** OAuth scope to request. */
2424
scope?: string;
2525
/** OAuth audience to request. */
26-
audience?: 'crisp-athena-live';
26+
audience?: 'crisp-athena-live' | 'crisp-athena-dev' | 'crisp-athena-qa';
2727
};
2828

2929
/**
@@ -120,12 +120,12 @@ export class AuthenticationManager {
120120
if (this.token === undefined) {
121121
if (this.options.scope) {
122122
this.token = await clientCredentialsGrant(this.discovery, {
123-
audience: 'crisp-athena-live',
123+
audience: this.options.audience || 'crisp-athena-live',
124124
scope: this.options.scope,
125125
});
126126
} else {
127127
this.token = await clientCredentialsGrant(this.discovery, {
128-
audience: 'crisp-athena-live',
128+
audience: this.options.audience || 'crisp-athena-live',
129129
});
130130
}
131131

0 commit comments

Comments
 (0)