© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•2y ago•
11 replies
hutonahill

✅ Configuring .NET 8 Identity

I've set up authentication with .NET Identity on a minimal API and now i am trying to tweak how it works.

currently you call the
/register
/register
endpoint and send in a username and password, and the system registers an account. Then you call
/login
/login
and pass your username and password which then passes back an login token which you can use to authenticate yourself.

I want to require certain actions, such as setting up 2FA and confirming their email (though not yet, haven't gotten around to sending emails automatically yet. seems like an issue for another day) before the user is considered authenticated.

I've done some looking into roles and it seems so close.
/register
/register
could assign the user the
registering
registering
role, then calls like
/confirmEmail
/confirmEmail
and
/manage/2fa
/manage/2fa
could check if requirements have been met and give them a
registered
registered
role.

Unfortunately my best guess to implement this behavior is to reimplement the
/register
/register
,
/confirmEmail
/confirmEmail
and
/manage/2fa
/manage/2fa
endpoints, which i would really like to avoid.

Is there any other way to implement this behaver? Is there a way i can have the endpoint call another method on completion? are there modifiers i could use to implement this? or am i stuck copying everything?
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Identity .NET 8
C#CC# / help
2y ago
.NET 8 SPA Identity
C#CC# / help
2y ago
✅ .NET 8 Identity with SQLite
C#CC# / help
2y ago
.Net 8 Blazor Web App Identity Framework Help
C#CC# / help
3y ago