Giter VIP home page Giter VIP logo

aspnet-core-registration-login-api's Introduction

aspnet-core-registration-login-api's People

Contributors

cornflourblue 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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

aspnet-core-registration-login-api's Issues

use mvcController?

this project used mvc ControllerBase, when should we use ApiController?

UsersController.Authenticate method - is it taking and returning the right things?

Hi Jason, thanks so much for the code, it's really useful and very educational.

I was looking at the Authenticate method and wondering a few things:

  1. It takes a UserDto as a parameter but it only actually needs and uses the the Username and Password properties from that object. Would it be more obvious to people consuming the API if the username and password were simply parameters, or if there was a CredentialsDto that just had the username and password?
  1. There's no return type defined for the Authenticate method, so documentation builders like Swagger won't describe the endpoint fully for anyone who's going to use the endpoint. Would it be worth defining a LoggedInUserDto object instead of the anonymous object that's currently returned so the method can then be set to ActionResult<LoggedInUserDto>?

Happy to stick in a pull request with those changes if you think they would be useful

Coundn't connect to Register Method

Yes I figured it out soon..I Checked register method with below code and Postaman returns with success.
public IActionResult Register([FromForm]UserDto userDto)
{
// map dto to entity
var user = _mapper.Map(userDto);
return Ok(new
{
user
});
but if exact code is in place in Register method. then the execution flow hit by another blocker.
Postman request

image

Exception :

image

asp.net identity?

What the reasoning of not using it and is it possible to use instead of the custom user service?

Getting logged in user.

I'm creating an API without a frontend. I'm able to create a new user and log in with the account, but how do I access the user from within a controller without sending the username and password each time I want to access the API?

database return error "too many clients connected"

Hello Jason,

Thank you very much, your articles and codes are very helpful to me as a newbie now.

I am trying to build a blog webapi with forking this repository, I use Npgsql connect to a PostgreSQL database, and add some methods, but the database return error message "too many clients connected" when I debugging.

So how to close the connections in webapi? I read some documents but can't find a way to do with it.

my repo fork from yours :
https://github.com/Rackar/aspnet-core-registration-login-api

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.