https://github.com/mingderwang/lucia-astro-github-oauth
GitHub OAuth example with Lucia and Astro (release to vercel fail because of cannot run sqlite)
https://github.com/mingderwang/lucia-astro-github-oauth
astro example lucia lucia-auth
Last synced: 7 months ago
JSON representation
GitHub OAuth example with Lucia and Astro (release to vercel fail because of cannot run sqlite)
- Host: GitHub
- URL: https://github.com/mingderwang/lucia-astro-github-oauth
- Owner: mingderwang
- License: mit
- Created: 2023-11-24T06:49:00.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-12-02T04:52:47.000Z (almost 2 years ago)
- Last Synced: 2025-01-14T09:23:04.895Z (9 months ago)
- Topics: astro, example, lucia, lucia-auth
- Language: TypeScript
- Homepage: https://github.com/settings/developers
- Size: 58.6 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# GitHub OAuth example with Lucia and Astro
```bash
# install dependencies
pnpm i# run dev server
pnpm dev
```## Setup GitHub OAuth
[Create a new GitHub OAuth app](https://docs.github.com/en/apps/oauth-apps/building-oauth-apps/creating-an-oauth-app). The redirect uri should be set to `localhost:5173/login/github/callback`. Copy and paste the client id and secret into `.env`.
```bash
GITHUB_CLIENT_ID=""
GITHUB_CLIENT_SECRET=""
```## User schema
| id | type | unique |
| ---------- | -------- | :----: |
| `id` | `string` | |
| `username` | `string` | |