dotnet / aspnetcore

ASP.NET Core is a cross-platform .NET framework for building modern cloud-based web applications on Windows, Mac, or Linux.
https://asp.net
MIT License
35.47k stars 10.03k forks source link

the ASPNetCore original API template project is missing the 'Store user accounts in-app' Authentication #11216

Closed ahmed-abdelrazek closed 11 months ago

ahmed-abdelrazek commented 5 years ago

the ASP Net Core 3 preview 6 original API template project in Visual Studio 2019 Community 16.1.3 is missing the 'Store user accounts in-app' authentication option for Individual User Accounts.

Just open visual studio and start creating a new ASP Core API project with Individual User Accounts authentication There is will be only one option and that is Connect to an existing user store in the cloud

Screenshots

image

blowdart commented 5 years ago

This is expected. You can create an API project with Identity Server as an in app store at the command line, not within the UI

ahmed-abdelrazek commented 5 years ago

i don't know how is this expected i should be able to do so from within visual studio the old one let me and the other new templates still do like mvc angular reactjs etc but even so the command line doesn't offer an option to do it when creating a new webapi project

for the WebAPI image

for Angular image

it's also offer the option from within visual studio for Angular ReactJS and Blazor but not the WebAPI image

also the MVC template project from within visual studio and command line offers all of them image image

blowdart commented 5 years ago

It's only in .NET Core 3 previews. Have you installed that?

And there's always a lag before things appear in a VS UI as we, hopefully, get feedback from the community on how things are implemented. There's no point in going through the pain of adjusting the VS UI until the templates are set

javiercn commented 5 years ago

Individual user accounts is only available through the SPA templates. We don't have support in the API template at this time.

blowdart commented 5 years ago

Oh heck yes, my bad.

ahmed-abdelrazek commented 5 years ago

It's only in .NET Core 3 previews. Have you installed that?

And there's always a lag before things appear in a VS UI as we, hopefully, get feedback from the community on how things are implemented. There's no point in going through the pain of adjusting the VS UI until the templates are set

yes, you can check the net core version being used from the right bottom corner of the screenshot of visual studio

ahmed-abdelrazek commented 5 years ago

Individual user accounts is only available through the SPA templates. We don't have support in the API template at this time.

seems about right i checked all the dot net core template project from version 1 to 3 preview 6 and the webapi doesn't support it.

any plans adding it for the dot net core 3.0 release or 3.1?

blowdart commented 5 years ago

Sorry for leading you astray, I should stop triaging issues before coffee :)

We've been thinking about it, but getting it into spa templates was the big push for 3.0.

It might make it, but right now it's not a high priority because it's a bit of an oddity, because if you create it and hit f5, well, there's nothing, you'll get a 401 which won't see in the browser. The template, if working as expected, would look broken.

Until we have a repl, and one that supports an oauth dance it'd be hard to have something that is usable immediately upon creation.

ahmed-abdelrazek commented 5 years ago

Sorry for leading you astray, I should stop triaging issues before coffee :)

We've been thinking about it, but getting it into spa templates was the big push for 3.0.

It might make it, but right now it's not a high priority because it's a bit of an oddity, because if you create it and hit f5, well, there's nothing, you'll get a 401 which won't see in the browser. The template, if working as expected, would look broken.

Until we have a repl, and one that supports an oauth dance it'd be hard to have something that is usable immediately upon creation.

no problem, but first you should take a look at the dot net framework web api project with individual user accounts because that how everyone from asp.net 5 expect it to be at least that what i think.

blowdart commented 5 years ago

Yes, that gap has been a long standing problem. The solution is, frankly, Identity Server, it's what we've recommended for Core, and we didn't want to start reinventing the wheel. Our integration will probably be a slightly simpler configuration were we hide the complications for very simple, streamlined scenarios to get folks started.

So if you need it now, use the templates Identity Server provides :)

ahmed-abdelrazek commented 5 years ago

no i was just trying wpf core and core webapi for the first time making a simple project and was just surprised it wasn't there by default so i came to report it

blowdart commented 5 years ago

And thanks for reminding me. I need to find a way to write up why it's not there right now, so it's not a surprise. It will come at some point, but just not now. So I'll pop this into backlog as a reminder.

ahmed-abdelrazek commented 5 years ago

is this going into net core 3.1 or .net 5?

imukai commented 5 years ago

Just spent 30+ minutes trying to figure out why none of the Identity scaffolding was appearing in a new project (created from the UI) and came to find this thread -- and now I'm disappointed that anything would ship in this state.

ahmed-abdelrazek commented 5 years ago

the sad thing is no one cared enough to check on it since .net core released @imukai @blowdart

UlissesMeira commented 4 years ago

Sorry for leading you astray, I should stop triaging issues before coffee :)

We've been thinking about it, but getting it into spa templates was the big push for 3.0.

It might make it, but right now it's not a high priority because it's a bit of an oddity, because if you create it and hit f5, well, there's nothing, you'll get a 401 which won't see in the browser. The template, if working as expected, would look broken.

Until we have a repl, and one that supports an oauth dance it'd be hard to have something that is usable immediately upon creation.

Maybe a template can deliver a collection of Postman for test.. working like a MockServer... i think thats can be a idea..

duaneking commented 3 years ago

So I am on version 5 of asp .Net and this is still an issue.

I don't have any beta bits installed at all that I'm aware of because I only install production updates. So this is actually a production issue, not a beta issue.

I just want to be able to start a weekend project without having to suffer through re-reading 30 pages of docs, and since this is clearly a defect how do I start a new project successfully that has individual account support using visual studio 2019?

ahmed-abdelrazek commented 3 years ago

@duaneking yes, and i don't think they are going to add it anytime soon

mkArtakMSFT commented 11 months ago

This is now simpler given the new Identity APIs that were added in .NET 8. We don't have plans to expose an option though through the template at the moment.

ahmed-abdelrazek commented 11 months ago

lol i forgot this one for any one that still looking at the end of 2023 https://devblogs.microsoft.com/dotnet/whats-new-with-identity-in-dotnet-8/