Skip to content

Commit

Permalink
throw an error when audience is used without oidcConformant flag (#947)
Browse files Browse the repository at this point in the history
  • Loading branch information
luisrudge authored Mar 27, 2017
1 parent c57991c commit aed28b3
Showing 1 changed file with 5 additions and 1 deletion.
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

0 comments on commit aed28b3

Please sign in to comment.