Skip to content

Commit

Permalink
feat: check that client id is present
Browse files Browse the repository at this point in the history
  • Loading branch information
abouroubi committed Jan 25, 2021
1 parent 503e25a commit 25ab864
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/strategy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@ export class AppleTokenStrategy extends Strategy {
throw new Error('AppleVerifyTokenStrategy requires a verify function');
}

if(!options.clientId) {
throw new Error('AppleVerifyTokenStrategy requires a ClientID');
}

this.appleIdKeysUrl = options.appleIdKeysUrl || 'https://appleid.apple.com/auth/keys';
this.appleIssuer = options.appleIssuer || 'https://appleid.apple.com';
this.clientId = options.clientId;
Expand Down

0 comments on commit 25ab864

Please sign in to comment.