Support sub-path deploy via NEXT_PUBLIC_BASE_PATH (loma.chat/pagiva)
Adds basePath config, withBase/appUrl helpers, base-path-aware cookies, OAuth redirects, manifest, service worker and cron runner. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import { appUrl } from "@/lib/base-path";
|
||||
import { SignJWT, jwtVerify } from "jose";
|
||||
import { GRAPH_API_VERSION, graphGet, UserFacingError } from "./client";
|
||||
|
||||
@@ -40,7 +41,7 @@ export function appAccessToken(): string | null {
|
||||
}
|
||||
|
||||
export function oauthRedirectUri(origin: string): string {
|
||||
return `${process.env.NEXT_PUBLIC_APP_URL || origin}/api/facebook/oauth/callback`;
|
||||
return `${appUrl(origin)}/api/facebook/oauth/callback`;
|
||||
}
|
||||
|
||||
export function oauthScopes(): string[] {
|
||||
|
||||
Reference in New Issue
Block a user