mirror of
https://github.com/wu736139669/hapi.git
synced 2026-11-24 04:47:03 +00:00
The native iOS and Android apps are now published. Replace the build-from-source install path with store links, mark the native apps as paid and the Web/PWA as the free client, and add store buttons to the website hero. Source builds remain documented for developers.
22 lines
856 B
TypeScript
22 lines
856 B
TypeScript
export const COOKIE_NAME = "app_session_id";
|
|
export const ONE_YEAR_MS = 1000 * 60 * 60 * 24 * 365;
|
|
|
|
// Generate login URL at runtime so redirect URI reflects the current origin.
|
|
export const getLoginUrl = () => {
|
|
const oauthPortalUrl = import.meta.env.VITE_OAUTH_PORTAL_URL;
|
|
const appId = import.meta.env.VITE_APP_ID;
|
|
const redirectUri = `${window.location.origin}/api/oauth/callback`;
|
|
const state = btoa(redirectUri);
|
|
|
|
const url = new URL(`${oauthPortalUrl}/app-auth`);
|
|
url.searchParams.set("appId", appId);
|
|
url.searchParams.set("redirectUri", redirectUri);
|
|
url.searchParams.set("state", state);
|
|
url.searchParams.set("type", "signIn");
|
|
|
|
return url.toString();
|
|
};
|
|
|
|
export const APP_STORE_URL = "https://apps.apple.com/app/id6805699104";
|
|
export const GOOGLE_PLAY_URL = "https://play.google.com/store/apps/details?id=run.hapi.companion";
|