RoverCore / Documentation

Documentation for RoverCore
Apache License 2.0
0 stars 12 forks source link

Identity on ASP.NET Core #7

Open tanczosm opened 2 years ago

tanczosm commented 2 years ago

Identity on ASP.NET Core

GavanQuimby commented 2 years ago

In my own words: Identity on ASP.net is a system that allows users to add functionalities via a login system. This means a user can create an account/login with a username and password. Some good examples are Google, Twitter, and Facebook accounts.

tanczosm commented 2 years ago

This should be expanded to 2 to 3 typed pages. Leave out mentioning "in my own words". This lacks a ton of detail and is generally unhelpful at the moment.

GavanQuimby commented 2 years ago

I understand that, just starting discussions on the issue page as the prompt said.

Magentaman24 commented 2 years ago

Hi

tanczosm commented 2 years ago

Just so you guys know, the UserManager and SigninManager are services that are available through dependency injection. Since we customized the user for Rovercore, you can use:

UserManager as the user manager service and SignInManager as the signin manager service

Both services can be then referenced in the constructor of any controller if you need them. . for example:

    private readonly UserManager<ApplicationUser> _userManager;
    private readonly SignInManager<ApplicationUser> _signInManager;

    public AccountController(UserManager<ApplicationUser> userManager, SignInManager<ApplicationUser> signInManager)
    {
        _userManager = userManager;
        _signInManager = signInManager;
    }