You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs-src/silent-refresh.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -70,7 +70,7 @@ this
70
70
.catch(err=>console.error('refresh error', err));
71
71
```
72
72
73
-
When there is an error in the iframe that prevents the communication with the main application, silentRefresh will give you a timeout. To configure the timespan for this, you can set the property ``siletRefreshTimeout`` (msec). The default value is 20.000 (20 seconds).
73
+
When there is an error in the iframe that prevents the communication with the main application, silentRefresh will give you a timeout. To configure the timespan for this, you can set the property ``silentRefreshTimeout`` (msec). The default value is 20.000 (20 seconds).
74
74
75
75
### Automatically refreshing a token when/ before it expires
.catch(err => console.error('refresh error', err));</code></pre><p>When there is an error in the iframe that prevents the communication with the main application, silentRefresh will give you a timeout. To configure the timespan for this, you can set the property <code>siletRefreshTimeout</code> (msec). The default value is 20.000 (20 seconds).</p>
658
+
.catch(err => console.error('refresh error', err));</code></pre><p>When there is an error in the iframe that prevents the communication with the main application, silentRefresh will give you a timeout. To configure the timespan for this, you can set the property <code>silentRefreshTimeout</code> (msec). The default value is 20.000 (20 seconds).</p>
659
659
<h3id="automatically-refreshing-a-token-when-before-it-expires">Automatically refreshing a token when/ before it expires</h3>
660
660
<p>To automatically refresh a token when/ some time before it expires, just call the following method after configuring the OAuthService:</p>
661
661
<preclass="line-numbers"><codeclass="language-TypeScript">this.oauthService.setupAutomaticSilentRefresh();</code></pre><p>By default, this event is fired after 75% of the token's life time is over. You can adjust this factor by setting the property <code>timeoutFactor</code> to a value between 0 and 1. For instance, 0.5 means, that the event is fired after half of the life time is over and 0.33 triggers the event after a third.</p>
0 commit comments