Skip to content

JWT Installation

Install the addon with the Keel CLI:

Terminal window
keel add jwt

Manual install is still possible:

Terminal window
go get github.com/slice-soft/ss-keel-jwt
  • Adds github.com/slice-soft/ss-keel-jwt to the project dependencies.
  • Creates cmd/setup_jwt.go.
  • Injects jwtProvider := setupJWT(app, appLogger) into cmd/main.go.
  • Adds config-facing property keys and .env examples for the JWT settings.

Generated config keys:

jwt.secret=${JWT_SECRET:change-me-in-production}
jwt.issuer=${JWT_ISSUER:}
jwt.token-ttl-hours=${JWT_TOKEN_TTL_HOURS:24}

Generated env examples:

Terminal window
JWT_SECRET=change-me-in-production
JWT_ISSUER=
JWT_TOKEN_TTL_HOURS=24

After installation, wire route protection with jwtProvider.Middleware() or continue to ss-keel-oauth if you want provider login flows on top of JWT issuance.