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
Address Copilot review: add loading state, error test, refresh test
- Add auth.isLoading handling to token-refresh TokenStatus
- Add error rendering test and refresh button click test
- Fix README to accurately describe both auto and manual refresh
- Regenerate snippets
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: samples/react/token-refresh/README.md
+9-2Lines changed: 9 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,11 @@
1
1
# React SPA — Token Refresh
2
2
3
-
Minimal React app demonstrating token refresh using `react-oidc-context` with the `offline_access` scope. The library automatically exchanges refresh tokens for new access tokens before they expire.
3
+
Minimal React app demonstrating token refresh using `react-oidc-context` with the `offline_access` scope. Tokens are refreshed automatically before they expire, and can also be refreshed manually via a button.
4
+
5
+
## Prerequisites
6
+
7
+
-`offline_access` scope enabled on the client
8
+
-`refresh_token` grant type enabled in workspace OAuth settings and in the application's Grant Types
4
9
5
10
## Setup
6
11
@@ -13,4 +18,6 @@ Minimal React app demonstrating token refresh using `react-oidc-context` with th
13
18
14
19
- OIDC configuration with `offline_access` scope for refresh tokens
15
20
- Automatic token refresh via refresh tokens (no iframe needed)
16
-
- Displaying token expiry and refresh status
21
+
- Manual token refresh via `signinSilent()` button
0 commit comments