cli-client.ts
This file
Path
apps/platform/src/auth/cli-client.ts
18 lines · 608 bytes · TypeScript
Last changed by
Merge build/comments-platform into mainoscabrielbefore adoptionddf09e8
History of this fileTake it
The walk stopped after 200 commits: lines older than 678c8b8 point at it.
Merge build/614-env-service: deciders set write-only values for @sensitive items, the public sees the env shape, and checks see only placeholdersoscabrielbefore adoption678c8b8
lines 1–6why, one step back1import { Brand } from "@repo/brand";23export const CLI_CLIENT_PATH = "/oauth/cli";45export const cliClientId = (origin: string) => `${origin}${CLI_CLIENT_PATH}`;6Merge build/comments-platform into mainoscabrielbefore adoptionddf09e8
line 7why, one step back7// RFC 8252: the provider matches loopback redirects without the port.Merge build/614-env-service: deciders set write-only values for @sensitive items, the public sees the env shape, and checks see only placeholdersoscabrielbefore adoption678c8b8
lines 8–18why, one step back8export const cliClientMetadata = (origin: string) => ({9 client_id: cliClientId(origin),10 client_name: `${Brand.name} CLI`,11 grant_types: ["authorization_code", "refresh_token"] as const,12 redirect_uris: [13 "http://127.0.0.1/callback",14 "http://[::1]/callback",15 ] as const,16 response_types: ["code"] as const,17 token_endpoint_auth_method: "none" as const,18});