Skip to content

Commit 831608e

Browse files
committed
Fix manfredsteyer#523: Accept missing 'https://' for issuer accounts.google.com
1 parent fb361a0 commit 831608e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

projects/lib/src/oauth-service.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -1500,7 +1500,10 @@ export class OAuthService extends AuthConfig {
15001500
return Promise.reject(err);
15011501
}
15021502

1503-
if (claims.iss !== this.issuer) {
1503+
// Google sets iss to 'accounts.google.com' (without https://)
1504+
// so accept a missing 'https://' if iss is 'accounts.google.com'
1505+
if (claims.iss !== this.issuer &&
1506+
(claims.iss !== 'accounts.google.com') || 'https://' + claims.iss !== this.issuer) {
15041507
const err = 'Wrong issuer: ' + claims.iss;
15051508
this.logger.warn(err);
15061509
return Promise.reject(err);

0 commit comments

Comments
 (0)