https://github.com/peterdee/go-fiber-auth-2024
Fiber application with authentication & authorization
https://github.com/peterdee/go-fiber-auth-2024
go go-fiber golang gorm jwt postgresql redis
Last synced: 7 months ago
JSON representation
Fiber application with authentication & authorization
- Host: GitHub
- URL: https://github.com/peterdee/go-fiber-auth-2024
- Owner: peterdee
- License: mit
- Created: 2024-03-29T11:58:12.000Z (over 1 year ago)
- Default Branch: release
- Last Pushed: 2024-05-08T12:39:25.000Z (over 1 year ago)
- Last Synced: 2025-01-21T10:11:14.743Z (9 months ago)
- Topics: go, go-fiber, golang, gorm, jwt, postgresql, redis
- Language: Go
- Homepage: http://localhost:2024
- Size: 88.9 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
## go-fiber-auth-2024
Authentication & authorization in [Fiber](https://gofiber.io) (an up-to-date version of https://github.com/peterdee/go-fiber-auth)
Key features:
- PostgreSQL
- Redis
- JWT
- Additional JWT protection mechanics (fingerprinting, token pairing)
- Gloabal error handler with custom errors### Deploy
```shell script
git clone https://github.com/peterdee/go-fiber-auth-2024
cd ./go-fiber-auth-2024
gvm use go1.22
go mod download
```### Environment variables
`ENV_SOURCE` environment variable determines the origin of environment variables: `file` or `env`
If `ENV_SOURCE` variable is set to `file`, then `.env` file is required and the app will not launch without it
Required environment variables are located in [.env.example](./.env.example) file
### Launch
**Without Docker**
```shell script
ENV_SOURCE=file go run ./# With AIR
ENV_SOURCE=file air
```**With Docker**
```shell script
docker run -p 2024:2024 --env-file .env -it $(docker build -q .)
```**With Docker Compose**
```shell script
docker compose up -d
```### License
[MIT](./LICENSE.md)