Unable to send 2fa code to mail & unable to obtain GET account/2fa and POST account/2fa in dotnet 8 identity endpoints. #53169
Labels
area-identity
Includes: Identity and providers
enhancement
This issue represents an ask for new feature or an enhancement to an existing one
Milestone
Describe the bug
In dotnet 8 Identity endpoints there are few built in endpoints are released as per this PR.
I have added the authorization to the service as
builder.Services.AddAuthorization();
If I Add endpoints by
builder.Services.AddIdentityApiEndpoints<IdentityUser>().AddEntityFrameworkStores<AppDbContext>();
And when I map the endpoints as

app.MapGroup("/identity").MapIdentityApi<IdentityUser>();
It is exposing these endpoints as given in the below image.
I didn't get the GET account/2fa endpoint or POST account/2fa endpoint.
Additionally, I want to ask that how can we enable the 2fa with dotnet-8 identity endpoints as like aspnetcore1.1 framework.
I want to send the OTP code to the user email and want to verify the code. What the additional thing I have to do.
The scenario is like it should work seemlessly as the aspnet framework web app.
Does the identity endpoint provides the way to do so? if Yes then how.
Expected Behavior
The api should expose the GET and POST account/2fa endpoints to send the code to user Email and verify it.
Steps To Reproduce
Just follow this documentation and just write the simple code to add authorization to the service, add identity endpoints to the service with the sql server entityframeworkstore and just map the endpoints to the route by
app.MapGroup("/identity").MapIdentityApi<IdentityUser>();
..NET Version
8.0.0
I don't know how to add the 2fa in the api. So anything to solve this issue would be great help.
The text was updated successfully, but these errors were encountered: