SurfSense/surfsense_web/components/assistant-ui/connector-popup
suryo12 aa86534a52 refactor(web): centralize OAuth callback cookie contract (fixes #1362)
Replace the duplicated `OAUTH_RESULT_COOKIE` constant and inline payload
type across the callback route and connector dialog hook with a shared
`contracts/types/oauth.types.ts` module that exports:

- OAUTH_RESULT_COOKIE constant
- oauthCallbackResultSchema Zod schema
- OAuthCallbackResult type (inferred from the schema)
- parseOAuthCallbackResult() helper that returns null on invalid JSON
  or shape mismatch

The route handler now uses the shared type to constrain the cookie
payload at compile time. The consumer hook validates the cookie value
through the helper instead of an unchecked JSON.parse, removing the
silent runtime risk when the cookie is tampered with or its shape
drifts.
2026-05-23 23:22:18 +07:00
..
components refactor: replace button elements with Button component for improved consistency and styling across additional UI components 2026-05-14 15:02:46 +05:30
config refactor(env): streamline BACKEND_URL usage in GoogleLoginButton and DocumentTabContent; update connector-status-config for Composio Google Drive connector maintenance 2026-05-21 13:37:55 -07:00
connect-forms Merge branch 'dev' into fix/env-config-connector-forms 2026-05-20 03:26:12 +05:30
connector-configs Merge branch 'dev' into fix/env-config-connector-forms 2026-05-20 03:26:12 +05:30
constants chore: linting 2026-05-02 22:25:04 -07:00
hooks refactor(web): centralize OAuth callback cookie contract (fixes #1362) 2026-05-23 23:22:18 +07:00
tabs refactor: update UI components to utilize 'popover-border' for consistent styling and enhance overall design coherence 2026-05-14 12:53:52 +05:30
utils fix: remove unnecessary 'use client' directives to reduce client bundle 2026-04-08 04:39:39 +05:30
views Merge branch 'dev' into fix/env-config-connector-forms 2026-05-20 03:26:12 +05:30
index.ts refactor: remove query params for connector popup and improve connector callback URLs 2026-03-18 16:08:30 +05:30