@@ -65,7 +65,7 @@ export class OAuthService extends AuthConfig {
65
65
* The received (passed around) state, when logging
66
66
* in with implicit flow.
67
67
*/
68
- public state ?= '' ;
68
+ public state ? = '' ;
69
69
70
70
protected eventsSubject : Subject < OAuthEvent > = new Subject < OAuthEvent > ( ) ;
71
71
protected discoveryDocumentLoadedSubject : Subject < object > = new Subject < object > ( ) ;
@@ -164,7 +164,7 @@ export class OAuthService extends AuthConfig {
164
164
public setupAutomaticSilentRefresh ( params : object = { } , listenTo ?: 'access_token' | 'id_token' | 'any' ) {
165
165
this . events . pipe ( filter ( e => e . type === 'token_expires' ) ) . subscribe ( e => {
166
166
const event = e as OAuthInfoEvent ;
167
- if ( listenTo == null || listenTo === 'any' || event . info === listenTo ) {
167
+ if ( listenTo == null || listenTo === 'any' || event . info === listenTo ) {
168
168
this . silentRefresh ( params ) . catch ( _ => {
169
169
this . debug ( 'Automatic silent refresh did not work' ) ;
170
170
} ) ;
@@ -1106,15 +1106,15 @@ export class OAuthService extends AuthConfig {
1106
1106
}
1107
1107
1108
1108
if ( this . config . responseType ) {
1109
- this . responseType = this . config . responseType ;
1109
+ this . responseType = this . config . responseType ;
1110
1110
} else {
1111
- if ( this . oidc && this . requestAccessToken ) {
1112
- this . responseType = 'id_token token' ;
1113
- } else if ( this . oidc && ! this . requestAccessToken ) {
1114
- this . responseType = 'id_token' ;
1115
- } else {
1116
- this . responseType = 'token' ;
1117
- }
1111
+ if ( this . oidc && this . requestAccessToken ) {
1112
+ this . responseType = 'id_token token' ;
1113
+ } else if ( this . oidc && ! this . requestAccessToken ) {
1114
+ this . responseType = 'id_token' ;
1115
+ } else {
1116
+ this . responseType = 'token' ;
1117
+ }
1118
1118
}
1119
1119
1120
1120
const seperationChar = that . loginUrl . indexOf ( '?' ) > - 1 ? '&' : '?' ;
@@ -1500,8 +1500,7 @@ export class OAuthService extends AuthConfig {
1500
1500
return Promise . reject ( err ) ;
1501
1501
}
1502
1502
1503
- /* Fix for google oidc */
1504
- if ( claims . iss !== this . issuer && 'https://' + claims . iss !== this . issuer ) {
1503
+ if ( claims . iss !== this . issuer ) {
1505
1504
const err = 'Wrong issuer: ' + claims . iss ;
1506
1505
this . logger . warn ( err ) ;
1507
1506
return Promise . reject ( err ) ;
@@ -1553,30 +1552,30 @@ export class OAuthService extends AuthConfig {
1553
1552
1554
1553
1555
1554
return this . checkAtHash ( validationParams )
1556
- . then ( atHashValid => {
1557
- if (
1558
- ! this . disableAtHashCheck &&
1559
- this . requestAccessToken &&
1560
- ! atHashValid
1561
- ) {
1562
- const err = 'Wrong at_hash' ;
1563
- this . logger . warn ( err ) ;
1564
- return Promise . reject ( err ) ;
1565
- }
1566
-
1567
- return this . checkSignature ( validationParams ) . then ( _ => {
1568
- const result : ParsedIdToken = {
1569
- idToken : idToken ,
1570
- idTokenClaims : claims ,
1571
- idTokenClaimsJson : claimsJson ,
1572
- idTokenHeader : header ,
1573
- idTokenHeaderJson : headerJson ,
1574
- idTokenExpiresAt : expiresAtMSec
1575
- } ;
1576
- return result ;
1577
- } ) ;
1555
+ . then ( atHashValid => {
1556
+ if (
1557
+ ! this . disableAtHashCheck &&
1558
+ this . requestAccessToken &&
1559
+ ! atHashValid
1560
+ ) {
1561
+ const err = 'Wrong at_hash' ;
1562
+ this . logger . warn ( err ) ;
1563
+ return Promise . reject ( err ) ;
1564
+ }
1565
+
1566
+ return this . checkSignature ( validationParams ) . then ( _ => {
1567
+ const result : ParsedIdToken = {
1568
+ idToken : idToken ,
1569
+ idTokenClaims : claims ,
1570
+ idTokenClaimsJson : claimsJson ,
1571
+ idTokenHeader : header ,
1572
+ idTokenHeaderJson : headerJson ,
1573
+ idTokenExpiresAt : expiresAtMSec
1574
+ } ;
1575
+ return result ;
1576
+ } ) ;
1578
1577
1579
- } ) ;
1578
+ } ) ;
1580
1579
}
1581
1580
1582
1581
/**
0 commit comments