@@ -17,6 +17,7 @@ export const DefaultPopupTarget = "_blank";
1717const DefaultAccessTokenExpiringNotificationTimeInSeconds = 60 ;
1818const DefaultCheckSessionIntervalInSeconds = 2 ;
1919export const DefaultSilentRequestTimeoutInSeconds = 10 ;
20+ export const DefaultIFrameAttributes = undefined ;
2021
2122/**
2223 * The settings used to configure the {@link UserManager}.
@@ -46,6 +47,11 @@ export interface UserManagerSettings extends OidcClientSettings {
4647 /** The script origin to check during 'message' callback execution while performing silent auth via iframe (default: window.location.origin) */
4748 iframeScriptOrigin ?: string ;
4849
50+ /**
51+ * Defines additional attributes to add to iframe used by silent login.
52+ */
53+ iframeAttributes ?: Record < string , string > | undefined ;
54+
4955 /** The URL for the page containing the code handling the silent renew */
5056 silent_redirect_uri ?: string ;
5157 /** Number of seconds to wait for the silent renew to return before assuming it has failed or timed out (default: 10) */
@@ -112,6 +118,7 @@ export class UserManagerSettingsStore extends OidcClientSettingsStore {
112118
113119 public readonly silent_redirect_uri : string ;
114120 public readonly silentRequestTimeoutInSeconds : number ;
121+ public readonly iframeAttributes ?: Record < string , string > ;
115122 public readonly automaticSilentRenew : boolean ;
116123 public readonly validateSubOnSilentRenew : boolean ;
117124 public readonly includeIdTokenInSilentRenew : boolean ;
@@ -142,6 +149,7 @@ export class UserManagerSettingsStore extends OidcClientSettingsStore {
142149
143150 iframeNotifyParentOrigin = args . iframeNotifyParentOrigin ,
144151 iframeScriptOrigin = args . iframeScriptOrigin ,
152+ iframeAttributes = args . iframeAttributes ,
145153
146154 requestTimeoutInSeconds,
147155 silent_redirect_uri = args . redirect_uri ,
@@ -178,6 +186,7 @@ export class UserManagerSettingsStore extends OidcClientSettingsStore {
178186
179187 this . iframeNotifyParentOrigin = iframeNotifyParentOrigin ;
180188 this . iframeScriptOrigin = iframeScriptOrigin ;
189+ this . iframeAttributes = iframeAttributes ;
181190
182191 this . silent_redirect_uri = silent_redirect_uri ;
183192 this . silentRequestTimeoutInSeconds = silentRequestTimeoutInSeconds || requestTimeoutInSeconds || DefaultSilentRequestTimeoutInSeconds ;
0 commit comments