π¨ The ultimate agentic social media scheduling tool π€
TypeScript nextjsopen-sourceopen-source-social-media-scheduling-toolosspostiz-cloudpostiz-hostedredisscheduling-toolsocial-media-scheduling-tooltypescript
feat: auth changes
Nevo Davidc79965718f32
diff --git a/apps/frontend/src/app/(provider)/provider/[p]/page.tsx b/apps/frontend/src/app/(provider)/provider/[p]/page.tsxindex f0657bd38..979189868 100644--- a/apps/frontend/src/app/(provider)/provider/[p]/page.tsx+++ b/apps/frontend/src/app/(provider)/provider/[p]/page.tsx@@ -3,6 +3,15 @@** URL: /provider/:p (e.g. /provider/tiktok, /provider/instagram)*+ * --- Auth (native -> WebView, via URL) ---+ * Append `?loggedAuth=<jwt>` to the URL. The shared fetch wrapper+ * (libraries/helpers/src/utils/custom.fetch.func.ts) reads that search+ * param on every request and attaches it as the `auth` header, so any+ * authenticated API call made by the SettingsComponent or checkValidity+ * just works. The (provider) route is also excluded from the 401->/+ * redirect logic in LayoutContext, so a stale token won't yank the+ * WebView away from the form.+ ** --- Initial state (native -> WebView, push once) ---* Before loading the URL, the native side injects a global:*diff --git a/apps/frontend/src/components/layout/layout.context.tsx b/apps/frontend/src/components/layout/layout.context.tsxindex 5f87efb6e..202da5804 100644--- a/apps/frontend/src/components/layout/layout.context.tsx+++ b/apps/frontend/src/components/layout/layout.context.tsx@@ -28,7 +28,8 @@ function LayoutContextInner(params: { children: ReactNode }) {async (url: string, options: RequestInit, response: Response) => {if (typeof window !== 'undefined' &&- window.location.href.includes('/p/')+ (window.location.href.includes('/p/') ||+ window.location.pathname.startsWith('/provider/'))) {return true;}