Commit Graph

139 Commits

Author SHA1 Message Date
Igor Loskutov
2e94f4ccbe 401 reauth experiments 2025-09-05 14:20:00 -04:00
Igor Loskutov
01c969b8a9 doc 2025-09-05 13:05:00 -04:00
Igor Loskutov
462a897882 nextjs magic 2025-09-05 12:59:18 -04:00
Igor Loskutov
83f3d0bc9d nextjs magic 2025-09-05 12:44:12 -04:00
Igor Loskutov
2962ba5a7b CI debug 2025-09-04 22:16:01 -04:00
Igor Loskutov
c08a8d0cc0 CI debug 2025-09-04 22:03:52 -04:00
Igor Loskutov
c4c975eb7b github debug 2025-09-04 22:00:35 -04:00
Igor Loskutov
988586ee42 github debug 2025-09-04 21:58:06 -04:00
Igor Loskutov
9453ebe356 github debug 2025-09-04 21:43:52 -04:00
Igor Loskutov
50d4bcc0ac github debug 2025-09-04 21:39:45 -04:00
Igor Loskutov
03f2d2a30b github debug 2025-09-04 21:35:16 -04:00
Igor Loskutov
92f5d76d43 github debug 2025-09-04 21:25:01 -04:00
Igor Loskutov
82cc1d26d5 github debug 2025-09-04 21:16:06 -04:00
Igor Loskutov
c62c64362f github debug 2025-09-04 21:10:23 -04:00
Igor Loskutov
8a94f6d8bb github debug 2025-09-04 21:02:50 -04:00
Igor Loskutov
1f4ec01e2d github debug 2025-09-04 20:55:50 -04:00
Igor Loskutov
cacdcbfba2 INTERVAL_REFRESH_MS 2025-09-04 19:39:55 -04:00
Igor Loskutov
e9318708e1 proper api address from env 2025-09-04 19:22:43 -04:00
Igor Loskutov
89dd05ec84 prettier auth state ternary 2025-09-04 15:13:31 -04:00
Igor Loskutov
6f29d08d1c prettier auth state ternary 2025-09-04 15:11:16 -04:00
Igor Loskutov
790a61be0d less edgy config (ci) 2025-09-04 12:32:15 -04:00
Igor Loskutov
9695cc4bdf ci randomness 2025-09-04 12:12:46 -04:00
Igor Loskutov
669ebe74d8 ci randomness 2025-09-04 12:08:01 -04:00
Igor Loskutov
41c92b8aeb ci randomness 2025-09-04 12:02:57 -04:00
Igor Loskutov
3170605d9a ci randomness 2025-09-04 11:58:22 -04:00
Igor Loskutov
3e629a1ace less edgy config (ci) 2025-09-04 11:48:26 -04:00
Igor Loskutov
2811540d9a less edgy config (ci) 2025-09-04 11:45:24 -04:00
Igor Loskutov
8af6bf4998 less edgy config (ci) 2025-09-04 11:38:26 -04:00
Igor Loskutov
40fe4c1bc7 redis cache 2025-09-04 10:41:31 -04:00
Igor Loskutov
23a119dc3b invalidate room on room update 2025-09-03 13:11:20 -04:00
Igor Loskutov
4f66f14761 remove react-query tab sharing cache 2025-09-03 12:47:35 -04:00
Igor Loskutov
6a793edfb5 clarify access token refresh logic a bit 2025-09-03 12:31:50 -04:00
Igor Loskutov
0cbbd24c65 protect from zombie auth 2025-09-03 10:53:03 -04:00
Igor Loskutov
611e258d96 schema generator error type doc 2025-09-03 09:04:40 -04:00
Igor Loskutov
1b22eabb3f session auto refresh blink 2025-09-03 08:33:13 -04:00
Igor Loskutov
cff662709d cover TODOs + cross-tab cache 2025-09-03 07:57:11 -04:00
Igor Loskutov
08b82c76ce normalize auth provider 2025-09-03 07:10:20 -04:00
Igor Loskutov
5e4f519c83 compile fix 2025-09-02 19:12:04 -04:00
Igor Loskutov
1d5a22ad1d room detail page fix 2025-09-02 18:52:31 -04:00
Igor Loskutov
31c44ac0bb fix auth 2025-09-02 14:44:10 -04:00
Igor Loskutov
5ffc312d4a authReady callback simplify 2025-09-02 14:00:13 -04:00
Igor Loskutov
11ed585cea self-review-fix 2025-09-02 13:04:43 -04:00
Igor Monadical
ca75a4c95e Igor/mathieu/frontend openapi react query (#597)
* small typing

* typing fixes

---------

Co-authored-by: Igor Loskutov <igor.loskutoff@gmail.com>
2025-09-02 11:49:00 -04:00
0df1b224f2 fix: handle undefined access tokens in auth.ts
Added fallback to empty string for potentially undefined access_token
and refresh_token from NextAuth account object to satisfy
JWTWithAccessToken type requirements.
2025-08-29 18:56:08 -06:00
790b7992bb fix: remove infinite re-render loop in useSessionAccessToken
The hook was maintaining redundant local state that caused re-renders
on every update, which triggered NextAuth to continuously refetch the
session, resulting in hundreds of POST requests to /api/auth/session.

Simplified the hook to directly return session values without
unnecessary state duplication.
2025-08-29 18:52:13 -06:00
bb04407143 fix: add staleTime to prevent cross-tab staled data 2025-08-29 18:33:53 -06:00
485a263c0d refactor: remove Redis dependencies from frontend authentication
- Replace Redis/Redlock with in-memory cache for token management
- Remove @vercel/kv, ioredis, and redlock dependencies from package.json
- Implement simple lock mechanism for concurrent token refresh prevention
- Use Map-based cache with TTL for token storage
- Maintain same authentication flow without external dependencies

This simplifies the infrastructure requirements and removes the need for
Redis while maintaining the same functionality through in-memory caching.
2025-08-29 17:10:49 -06:00
d479d9d4e6 refactor: rename api-hooks.ts to apiHooks.ts for consistency
- Renamed api-hooks.ts to apiHooks.ts to follow camelCase convention
- Updated all 21 import statements across the codebase
- Maintains consistency with other non-component files (apiClient.tsx, useAuthReady.ts, etc.)
- Follows established naming pattern: PascalCase for components, camelCase for utilities/hooks
2025-08-29 16:44:21 -06:00
7ddae5ddd5 refactor: remove api-types.ts compatibility layer
- Migrated all 29 files from api-types.ts to use reflector-api.d.ts directly
- Removed $SourceKind manual enum in favor of OpenAPI-generated types
- Fixed unrelated Spinner component TypeScript error in AuthWrapper.tsx
- All imports now use: import type { components } from "path/to/reflector-api"
- Deleted api-types.ts file completely
2025-08-29 16:35:33 -06:00
8c525e09e8 refactor: clean up api-hooks.ts comments and improve search invalidation
- Remove redundant function category comments (exports are self-explanatory)
- Remove obvious inline comments for query invalidation
- Fix search endpoint invalidation to clear all queries regardless of parameters
2025-08-29 16:07:25 -06:00