Browse Source

fix(frontend): auth logic (#5390)

sp.wack 1 year ago
parent
commit
438f19c80e
2 changed files with 3 additions and 3 deletions
  1. 2 2
      frontend/src/entry.client.tsx
  2. 1 1
      frontend/src/routes.ts

+ 2 - 2
frontend/src/entry.client.tsx

@@ -52,8 +52,8 @@ async function prepareApp() {
 
 const queryClient = new QueryClient({
   queryCache: new QueryCache({
-    onError: (error) => {
-      toast.error(error.message);
+    onError: (error, query) => {
+      if (!query.queryKey.includes("authenticated")) toast.error(error.message);
     },
   }),
   defaultOptions: {

+ 1 - 1
frontend/src/routes.ts

@@ -15,5 +15,5 @@ export default [
     ]),
   ]),
 
-  route("oauth", "routes/oauth.github.callback.tsx"),
+  route("oauth/github/callback", "routes/oauth.github.callback.tsx"),
 ] satisfies RouteConfig;