https://github.com/codebar/auth
Auth for codebar (the project formerly known as auth-auth)
https://github.com/codebar/auth
Last synced: 21 days ago
JSON representation
Auth for codebar (the project formerly known as auth-auth)
- Host: GitHub
- URL: https://github.com/codebar/auth
- Owner: codebar
- License: bsd-2-clause
- Created: 2026-04-16T16:16:25.000Z (about 1 month ago)
- Default Branch: main
- Last Pushed: 2026-04-23T21:04:10.000Z (28 days ago)
- Last Synced: 2026-04-23T23:10:50.494Z (27 days ago)
- Language: JavaScript
- Homepage:
- Size: 482 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# auth-auth
Small authentication/profile system for Codebar.
## Local Setup
For login or registration via GitHub to work, you have create an [oauth2 application](https://github.com/settings/developers). Fetch client id and secret and setup the `.envrc` from included example (in `.envrc-dist`).
Then export `GITHUB_CLIENT_ID` and `GITHUB_CLIENT_SECRET` into the environment. We recommend using [direnv](https://direnv.net/).
---
For a new run the following:
```sh
npm ci
npm run db:generate
npm run db:migrate
npm run dev
```
To update your local copy:
```sh
npm ci
npm run db:migrate
npm run dev
```
---
View the application:
```sh
open http://localhost:3000
```
### Context
- data is saved in a sqlite database
- the app currently supports username/password, magic-link and GitHub OAuth
- for magic-link, **inspect the log to fetch the URL**
## What's happening here?
Once the application is running, you can try out the the following flows:
- sign-up
- sign-in (username/password, GitHub OAuth, magic-link)
In addition `/admin` hosts a very basic admin ui (list user, update roles).
## Demo
There's an additional application (mounted in this setup), that would demonstrate how to determine if a user is logged in.
```sh
open http://localhost:3000/demo
```