generated from fresh-app/fresh-remix-app
-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Right now authentication with GitHub is done via GitHub Apps, which requires an elaborate setup using private keys and stuff. Creating a GitHub App requires a lot of privilege on the organization. This makes it hard for people to contribute to the backend.
Task — Add ability to use Personal Access Token to auth with GitHub.
Recommended starting points
-
export interface GitHubUserConfig { auth: GitHubAppAuthUserConfig repo: string branch: string } export interface GitHubAppAuthUserConfig { appId: number privateKey: string } - Change
auth: GitHubAppAuthUserConfig | GitHubPersonalAccessTokenAuthUserConfig
- Add
GitHubPersonalAccessTokenAuthUserConfig
interface withtoken: string
- Change
-
contentsgarten/wiki.creatorsgarten.org/src/pages/api/contentsgarten/[action].ts
Lines 10 to 22 in aebab74
export const config = { testing: Env( z.object({ BACKEND: z.enum(['production', 'real']).default('real'), }), ), credentials: Env( z.object({ GH_APP_PRIVATE_KEY: z.string(), MONGO_URI: z.string(), }), ), } - Update
credentials
schema so that one ofGH_APP_PRIVATE_KEY
orGH_TOKEN
is provided.
- Update
If you use gh
CLI, you can use gh auth status --show-token
to get your own GitHub token. Alternatively you can go to https://github.com/settings/tokens to create new token.
Metadata
Metadata
Assignees
Labels
No labels