Skip to content

Commit

Permalink
throw an error when audience is used without oidcConformant flag
Browse files Browse the repository at this point in the history
  • Loading branch information
Luis Deschamps Rudge authored and Luis Deschamps Rudge committed Mar 24, 2017
1 parent 52f6c4a commit fba470f
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 fba470f

Please sign in to comment.