Skip to content

Complete example of an authentication microservice implementation

Notifications You must be signed in to change notification settings

LucasDiogo96/Identity-Service

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

66 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Identity Service

This repository contains a robust and scalable example of an authentication microservice using JWT in .NET 6

🛠️ Built With

🎯 Features

  • Identity
    • Authenticate a user
    • Refresh token
  • Register
    • Create a new user
  • Password recovery
    • Request change passoword verification code
    • Confirm verification code
    • Change password with verification
  • User
    • Get authenticated user
    • User update
  • Verification
    • Verify phone number
    • Verify email

⚡️ Quickstart

Inside the src folder, exec docker compose

docker compose-up

Screenshot_3

💻 Tests

1 - Go to the directory where the test project is.

cd src\Sample.Identity.Tests

2 - Execute the following command.

dotnet test

📊 Project Decisions

  • Currently, there is no officially implemented Microsoft Identity for MongoDB, only a third-party library. As authentication is the core of the project, it was decided not to rely on these libraries.

  • Sendgrid was chosen to send emails because the platform offers 100 free emails a day, in addition to being extremely cheap on paid plans and the possibility of using dynamic templates.

  • For sending sms, the Zenvia platform was chosen

🔖 Logs

The project has integration with the Kibana analytical tool, you can view the logs through the container that is started when performing the compose-up

Kibana

Patterns

The project architecture is based on some concepts of DDD and onion architecture, many of the concepts applied here you can find references in microsoft's own documentation.

👍 Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Releases

No releases published

Packages

No packages published