()
| 688 | |
| 689 | useEffect(() => { |
| 690 | const loadOAuthTokens = async () => { |
| 691 | try { |
| 692 | if (sseUrl) { |
| 693 | const key = getServerSpecificKey(SESSION_KEYS.TOKENS, sseUrl); |
| 694 | const tokens = sessionStorage.getItem(key); |
| 695 | if (tokens) { |
| 696 | const parsedTokens = await OAuthTokensSchema.parseAsync( |
| 697 | JSON.parse(tokens), |
| 698 | ); |
| 699 | updateAuthState({ |
| 700 | oauthTokens: parsedTokens, |
| 701 | oauthStep: "complete", |
| 702 | }); |
| 703 | } |
| 704 | } |
| 705 | } catch (error) { |
| 706 | console.error("Error loading OAuth tokens:", error); |
| 707 | } |
| 708 | }; |
| 709 | |
| 710 | loadOAuthTokens(); |
| 711 | }, [sseUrl]); |
no test coverage detected