https://github.com/vinukathejana/auth-server
An authentication server with email password, email magic link and OAuth login (w/ Google, GitHub, Facebook) while allowing the users to secure their profiles with modern 2factor authentication methods such as OTP (One Time Passcode) and PassKeys
https://github.com/vinukathejana/auth-server
auth-server authentication go-fiber golang
Last synced: 7 months ago
JSON representation
An authentication server with email password, email magic link and OAuth login (w/ Google, GitHub, Facebook) while allowing the users to secure their profiles with modern 2factor authentication methods such as OTP (One Time Passcode) and PassKeys
- Host: GitHub
- URL: https://github.com/vinukathejana/auth-server
- Owner: VinukaThejana
- License: mit
- Created: 2023-10-13T03:16:13.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-12-30T12:28:02.000Z (over 2 years ago)
- Last Synced: 2024-12-28T11:19:51.300Z (over 1 year ago)
- Topics: auth-server, authentication, go-fiber, golang
- Language: Go
- Homepage: https://documenter.getpostman.com/view/26265282/2s9YeAAaD4
- Size: 380 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Auth Server
An authentication server with all modern authentication methods such as,
- PassKeys
- OAuth login with providers such as,
- GitHub
- Google
- Twitter (X)
and with also support for 2 Factor authentication
## Links
- [API Documentation](https://documenter.getpostman.com/view/26265282/2s9YeAAaD4)
- [Frontend Implementation](https://github.com/VinukaThejana/auth-website)
## How to get started ?
- Create a .env file in the below given format
```
ACCESS_TOKEN_EXPIRED_IN
ACCESS_TOKEN_MAXAGE
ACCESS_TOKEN_PRIVATE_KEY
ACCESS_TOKEN_PUBLIC_KEY
ADMIN_SECRET
AUTH_CONFIRM_TOKEN_SECRET
DATABASE_URL
DEV_ENV
DOPPLER_CONFIG
DOPPLER_ENVIRONMENT
DOPPLER_PROJECT
FRONTEND_HOSTNAME
FRONTEND_URL
PORT
POSTGRES_DB
POSTGRES_HOST
POSTGRES_PASSWORD
POSTGRES_PORT
POSTGRES_USER
REDIS_CHALLENGE_URL
REDIS_EMAIL_URL
REDIS_RATELIMITER_HOST
REDIS_RATELIMITER_PASSWORD
REDIS_RATELIMITER_PORT
REDIS_RATELIMITER_USERNAME
REDIS_SESSION_URL
REDIS_SYSTEM_URL
REFRESH_TOKEN_EXPIRED_IN
REFRESH_TOKEN_MAXAGE
REFRESH_TOKEN_PRIVATE_KEY
REFRESH_TOKEN_PUBLIC_KEY
RESEND_API_KEY
SESSION_SECRET
```
- Run `go mod tidy`
- Run `docker compose up`
- Run `go run cmd/main.go`