GeezerVison is showing github.com — ignore: cloud · roderik/opencode@bce1398
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: cloud/function/src/auth.ts +8Lines changed: 8 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
|
1 | 1 | import { Resource } from "sst" |
2 | 2 | import { z } from "zod" |
3 | 3 | import { issuer } from "@openauthjs/openauth" |
| 4 | +import type { Theme } from "@openauthjs/openauth/ui/theme" |
4 | 5 | import { createSubjects } from "@openauthjs/openauth/subject" |
| 6 | +import { THEME_OPENAUTH } from "@openauthjs/openauth/ui/theme" |
5 | 7 | import { GithubProvider } from "@openauthjs/openauth/provider/github" |
6 | 8 | import { GoogleOidcProvider } from "@openauthjs/openauth/provider/google" |
7 | 9 | import { CloudflareStorage } from "@openauthjs/openauth/storage/cloudflare" |
@@ -24,9 +26,15 @@ export const subjects = createSubjects({ |
24 | 26 | }), |
25 | 27 | }) |
26 | 28 |
|
| 29 | +const MY_THEME: Theme = { |
| 30 | + ...THEME_OPENAUTH, |
| 31 | + logo: "https://opencode.ai/favicon.svg" |
| 32 | +}; |
| 33 | + |
27 | 34 | export default { |
28 | 35 | async fetch(request: Request, env: Env, ctx: ExecutionContext) { |
29 | 36 | return issuer({ |
| 37 | + theme: MY_THEME, |
30 | 38 | providers: { |
31 | 39 | github: GithubProvider({ |
32 | 40 | clientID: Resource.GITHUB_CLIENT_ID_CONSOLE.value, |
|