Skip to content

add additional fields to users & tenants table #28

Answered by JonPSmith
denxpert asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @denxpert,

You can't (and shouldn't) add extra parameters to the AuthP entity classes. Only the AuthP code should have access the AuthP DbContext. But of course you might want to hold extra data for your application, so this is how I do this.

  • For a tenant I would create an entity that contains extra data on the company. In Example3 I have a CompanyTenant which holds the tenant name, but in a real application I would store more information in a class like that.
  • For users I would look at the ASP.NET Core authentication handler to see if it stores that sort of information. Lots of modern authentication handlers do, like Azure AD, Auth0, Google etc., but others don't. If the authenticatio…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by JonPSmith
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants