Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lumbrjx/auth-with-lucia
auth system made by integrating Fastify with lucia-auth using typescript, redis for sessions
https://github.com/lumbrjx/auth-with-lucia
auth fastify lucia-auth mysql oauth2 prisma redis session
Last synced: 2 months ago
JSON representation
auth system made by integrating Fastify with lucia-auth using typescript, redis for sessions
- Host: GitHub
- URL: https://github.com/lumbrjx/auth-with-lucia
- Owner: lumbrjx
- Created: 2023-10-02T12:54:58.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-10-06T11:50:09.000Z (over 1 year ago)
- Last Synced: 2024-10-11T03:18:23.458Z (3 months ago)
- Topics: auth, fastify, lucia-auth, mysql, oauth2, prisma, redis, session
- Language: TypeScript
- Homepage: https://github.com/CLOG9/auth-with-lucia
- Size: 83 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# auth-with-fastify
A full auth system made with Fastify and Lucia-auth, typescript, and redis for session storage.
## getting started
first clone the repo and run
```bash
>> cd auth-wit-lucia
pnpm install
```make sure to define the your secret keys in a .env file in the root dir before starting the .env file should look like this:
```ts
MYSQL_ROOT_PASSWORD = "QSDFgij874fgfsqdçfDDDqsdfhhk";
MYSQL_DATABASE_URL =
"mysql://root:QSDFgij874fgfsqdç[email protected]:3306/mysql-image-database1k";REDIS_PORT = "6379";
REDIS_HOST = "localhost";GOOGLE_CLIENT_ID = "Add your own google id";
GOOGLE_CLIENT_SECRET = "Add your own google secret";
```after setting .env file setup the docker compose containers with this command:
_make sure you have docker already installed on your machine_
```bash
docker compose up -d
```then you you'll be able to run the server without any issues with this command:
```bash
pnpm dev
```## Note
**this repo is for education purposes only, don't use it for prod projects as your auth soultion.**