| 1234567891011121314151617181920212223242526272829303132 |
- /**
- * Briven Auth readiness for the portal.
- * Real sign-in needs project id + browser public key (pk_briven_auth_…).
- */
- export function getBrivenProjectId(): string | undefined {
- const id = process.env.NEXT_PUBLIC_BRIVEN_PROJECT_ID?.trim();
- return id || undefined;
- }
- export function getBrivenAuthPublicKey(): string | undefined {
- const key =
- process.env.NEXT_PUBLIC_BRIVEN_AUTH_KEY?.trim() ||
- process.env.BRIVEN_AUTH_PUBLIC_KEY?.trim();
- return key || undefined;
- }
- export function isBrivenAuthConfigured(): boolean {
- const id = getBrivenProjectId();
- const key = getBrivenAuthPublicKey();
- return Boolean(id && key && key.startsWith("pk_briven_auth_"));
- }
- export const DEMO_SESSION_KEY = "krypco_demo_session";
- export type DemoSession = {
- kind: "demo" | "wallet";
- userId: string;
- label: string;
- walletAddress?: string;
- createdAt: string;
- };
|