Skip to content

imaad666/gRPC-User-Auth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

2 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

User Authentication gRPC Microservice (Go)

This project is a user authentication microservice built with Go (Golang) using gRPC and Protocol Buffers. It demonstrates secure user registration and login, JWT-based authentication, password hashing with bcrypt, and rate limiting middleware.

Features

  • gRPC service definitions for user registration and login
  • JWT token generation and validation
  • Password hashing with bcrypt
  • Rate limiting middleware
  • Example Go client
  • Simple HTML web client for testing

Technologies Used

  • Go (Golang)
  • gRPC
  • Protocol Buffers
  • JWT (github.com/golang-jwt/jwt/v5)
  • bcrypt (golang.org/x/crypto/bcrypt)
  • Rate Limiting (golang.org/x/time/rate)

Project Structure

proto/   # Protocol Buffers (.proto) files
de server/   # Go gRPC server implementation
client/  # Go client example
web/     # Simple HTML client

Getting Started

Prerequisites

Install Go dependencies

go mod tidy

Generate gRPC code from proto

protoc --go_out=. --go-grpc_out=. proto/user.proto

Run the server

go run server/main.go

Run the Go client

go run client/main.go

Test with the HTML client

Open web/index.html in your browser and follow the instructions.

Credits

  • Built with Go (Golang)
  • gRPC, Protocol Buffers, JWT, bcrypt, and rate limiting libraries

Author: [Imaad]

This project is for educational/demo purposes. Contributions welcome!

About

๐Ÿ” User Authentication Microservice with Go & gRPC A secure and efficient user authentication microservice built with Go and gRPC. This project provides everything you need to handle user registration and login, with JWT-based authentication, password hashing, and protection against brute force attacks.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors