Skip to content

Commit

Permalink
Don't delete the refresh token
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasballinger committed Jan 9, 2025
1 parent 0663169 commit 8dc733e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
1 change: 0 additions & 1 deletion src/react/client.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,6 @@ export function AuthProvider({
(await storageGet(REFRESH_TOKEN_STORAGE_KEY)) ?? null;
if (refreshToken !== null) {
setIsRefreshingToken(true);
await storageRemove(REFRESH_TOKEN_STORAGE_KEY);
await verifyCodeAndSetToken({ refreshToken }).finally(() => {
setIsRefreshingToken(false);
});
Expand Down
7 changes: 6 additions & 1 deletion test/src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@ import ReactDOM from "react-dom/client";
import App from "./App.tsx";
import "./index.css";

const convex = new ConvexReactClient(import.meta.env.VITE_CONVEX_URL as string);
// set convex_client_verbose_auth_test to see logs in prod
const verboseAuth = !!localStorage.getItem("convex_client_verbose_auth_test");
const convex = new ConvexReactClient(
import.meta.env.VITE_CONVEX_URL as string,
{ verbose: verboseAuth },
);

ReactDOM.createRoot(document.getElementById("root")!).render(
<React.StrictMode>
Expand Down

0 comments on commit 8dc733e

Please sign in to comment.