- Add WorkOS SSO authentication (Google and Apple sign-in) - Add daily usage tracking with calendar view - Add setup wizard for substance selection (nicotine/cannabis) - Add daily check-in prompt on login - Add statistics dashboard (daily avg, streak, etc.) - Add quit plan generation after 7 days of tracking - Apply custom theme from brief.md - Add "stay logged in" preference Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
14 lines
382 B
TypeScript
14 lines
382 B
TypeScript
import { WorkOS } from '@workos-inc/node';
|
|
|
|
export const workos = new WorkOS(process.env.WORKOS_API_KEY!);
|
|
|
|
export const clientId = process.env.WORKOS_CLIENT_ID!;
|
|
|
|
export function getAuthorizationUrl(provider: 'GoogleOAuth' | 'AppleOAuth') {
|
|
return workos.userManagement.getAuthorizationUrl({
|
|
provider,
|
|
clientId,
|
|
redirectUri: process.env.WORKOS_REDIRECT_URI!,
|
|
});
|
|
}
|