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