GithubHelp home page GithubHelp logo

foyzulkarim / rbac-react-redux-aspnetcore Goto Github PK

View Code? Open in Web Editor NEW
67.0 5.0 15.0 7.95 MB

A starter template for creating JWT token from ASP.NET Core API project and applying that JWT token authentication on React application

License: MIT License

JavaScript 29.89% C# 69.84% Dockerfile 0.27%
react react-hooks redux redux-saga aspnetcore aspnet-web-api mongodb sql-server jwt rbac

rbac-react-redux-aspnetcore's Introduction

Welcome to RBAC-React-Redux-ASPNETCore repository !

This is a basic implementation of role-based access control which can be fully controlled from an Admin panel instead of hard coding the permissions inside of your code. This implementation covers the scenario of a basic microservice based system where the users can be having different roles and based on their roles, their permission will be different accross both in the Client side and in the Server side.

Technology used

This repository uses a number of frameworks and libraries to work:

  • ReactJS - A JavaScript library for building user interfaces
  • ASP.NET Core API - Build secure REST APIs on any platform with C#
  • SQL Server - SQL Server 2019 Express is a free edition of SQL Server
  • MongoDB - The database for modern applications
  • Redis - The database for caching

Installation and Run

Install the dependencies and dev dependencies and start the server.

You can manually install the database servers and configure the connections string by yourself. Or you can use the below docker command to run the database automatically for you.

To up and running the database servers

$ cd .\artifacts\docker
$ docker-compose up

To run Auth server

$ cd .\server\AuthWebApplication\AuthWebApplication\
$ dotnet restore
$ dotnet watch run

Verify the deployment by navigating to your server address in your preferred browser.

https://localhost:5001/

To run Resource server

$ cd .\server\WebApplication2\WebApplication2
$ dotnet restore
$ dotnet watch run

Verify the deployment by navigating to your server address in your preferred browser.

https://localhost:5003/

To run client

$ cd .\client
$ npm install
$ npm start

Verify the deployment by navigating to your server address in your preferred browser.

http://localhost:3000/

How to run video

React Redux JWT Authentication using ASP.NET Core API

React Redux JWT Authentication using ASP.NET Core API

How to run and debug the systems within less than 3 minutes with docker compose

How to run and debug the systems within less than 3 minutes

Todos

  • Write tests
  • Add nodejs resource server

License

MIT

rbac-react-redux-aspnetcore's People

Contributors

foyzulkarim avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

rbac-react-redux-aspnetcore's Issues

Reload redis cache when any permission data changed in storage

When the user logs in, then we store the permission data into redis cache.
But if any of the permission got changed while the user still logged in, then it is not possible for the Authorization server to apply the updated permission sets.
So, we should reload the user's permission cache in redis, when there is any change happened in the primary storage permission table.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.