This project is an example of how to implement authentication in a Go gRPC service using JWT.
- User registration and login
- JWT token generation and verification
- gRPC interceptor for authentication
- Go
- gRPC
- Protocol Buffers
- JWT
- Go 1.16+
- gRPC 1.40+
- Protocol Buffers 3.15+
- Clone the repository
- Run
go buildto build the binary - Run
go run main.goto start the service
- Register a new user using the
proto.AuthService.SignUpmethod - Login using the
proto.AuthService.SignInmethod - Use the
proto.AuthService.SignInmethod to authenticate requests
- Add client(gRPC)
- Add error handling and logging
- Add health check
- Add TLS
- Improve code style