Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Throw an error when audience is used without oidcConformant flag #947

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/core/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,11 @@ function extractAuthOptions(options) {
}

if (oidcConformant && !redirect && responseType.indexOf('id_token') > -1) {
throw new Error("It is not posible to request an 'id_token' while using popup mode.");
throw new Error("It is not possible to request an 'id_token' while using popup mode.");
}

if (!oidcConformant && audience) {
throw new Error("It is not possible to use the `auth.audience` option when the `oidcConformant` flag is set to false");
}

// for legacy flow, the scope should default to openid
Expand Down