@@ -331,14 +331,14 @@ export class OAuthService extends AuthConfig {
331
331
332
332
/**
333
333
* DEPRECATED. Use a provider for OAuthStorage instead:
334
- *
334
+ *
335
335
* { provide: OAuthStorage, useValue: localStorage }
336
- *
336
+ *
337
337
* Sets a custom storage used to store the received
338
338
* tokens on client side. By default, the browser's
339
339
* sessionStorage is used.
340
340
* @ignore
341
- *
341
+ *
342
342
* @param storage
343
343
*/
344
344
public setStorage ( storage : OAuthStorage ) : void {
@@ -845,7 +845,7 @@ export class OAuthService extends AuthConfig {
845
845
const redirectUri = this . silentRefreshRedirectUri || this . redirectUri ;
846
846
this . createLoginUrl ( null , null , redirectUri , noPrompt , params ) . then ( url => {
847
847
iframe . setAttribute ( 'src' , url ) ;
848
-
848
+
849
849
if ( ! this . silentRefreshShowIFrame ) {
850
850
iframe . style [ 'display' ] = 'none' ;
851
851
}
@@ -1083,12 +1083,16 @@ export class OAuthService extends AuthConfig {
1083
1083
) ;
1084
1084
}
1085
1085
1086
- if ( this . oidc && this . requestAccessToken ) {
1087
- this . responseType = 'id_token token' ;
1088
- } else if ( this . oidc && ! this . requestAccessToken ) {
1089
- this . responseType = 'id_token' ;
1086
+ if ( this . config . responseType ) {
1087
+ this . responseType = this . config . responseType ;
1090
1088
} else {
1091
- this . responseType = 'token' ;
1089
+ if ( this . oidc && this . requestAccessToken ) {
1090
+ this . responseType = 'id_token token' ;
1091
+ } else if ( this . oidc && ! this . requestAccessToken ) {
1092
+ this . responseType = 'id_token' ;
1093
+ } else {
1094
+ this . responseType = 'token' ;
1095
+ }
1092
1096
}
1093
1097
1094
1098
const seperationChar = that . loginUrl . indexOf ( '?' ) > - 1 ? '&' : '?' ;
0 commit comments