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
|`TokenManager.getTokens({ forceRenew: true })`|`await oidcClient.token.get({ forceRenew: true, backgroundRenew: true })`| Single call with auto-renewal. Returns tokens or error |
127
-
|`TokenManager.getTokens()` then manual code+state |`await oidcClient.authorize.background()` then `await oidcClient.token.exchange(code, state)`| Two-step when you need explicit control |
126
+
|`TokenManager.getTokens({ forceRenew: true })`|`await oidcClient.token.get({ forceRenew: true, backgroundRenew: true })`| Single call with auto-renewal. Returns tokens or error |
127
+
|`OAuth2Client.getAuthCodeByIframe()` then `TokenManager.getTokens({ authorizationCode, ...params })`|`await oidcClient.authorize.background()` then `await oidcClient.token.exchange(code, state)`| Two-step when you need explicit control over authorize + exchange|
128
128
|`TokenManager.deleteTokens()`|`await oidcClient.token.revoke()`| Revokes remotely AND deletes locally |
129
129
|`TokenStorage.get()`|`await oidcClient.token.get()`| Auto-retrieves from storage; check `'error' in tokens`|
130
130
|`TokenStorage.set(tokens)`| Handled automatically by `oidcClient.token.exchange()`| Tokens stored after exchange |
The new SDK primarily returns error objects instead of throwing exceptions. However, some`journey-client` methods may still throw in certain edge cases (known tech debt). Defensive code should handle both patterns:
185
+
Client **initialization** (factory functions like `journey()` and `oidc()`) will **throw** when misconfigured. However, once initialized, client **methods** return error objects instead of throwing exceptions. Some`journey-client` methods may still throw in certain edge cases (known tech debt). Defensive code should handle both patterns:
0 commit comments