asp.net core identity tables
SELECT * FROM dbo.AspNetUsers --has data
SELECT * FROM dbo.AspNetUserLogins
SELECT * FROM dbo.AspNetUserRoles--has data
SELECT * FROM dbo.AspNetUserTokens
SELECT * FROM dbo.AspNetUserClaims
SELECT * FROM dbo.AspNetRoles --has data
SELECT * FROM dbo.AspNetRoleClaims
It appears that when you create a new user using ASP.NET Core Identity, only the AspNetUsers
, AspNetUserLogins
, and AspNetUserRoles
tables have data, while the AspNetUserTokens
and AspNetUserClaims
tables are empty.
This behavior is expected. Let's briefly explain the purpose of each table:
-
AspNetUsers
: This table stores information about the registered users, such as their user ID, username, email, password hash, and other user-specific properties. -
AspNetUserLogins
: This table is used to store external login information for users who choose to authenticate using external providers (e.g., Google, Facebook). It keeps track of the linked login provider and the user's unique identifier for that provider. -
AspNetUserRoles
: This table associates users with roles. It stores the user ID and role ID for each user-role relationship, allowing for role-based authorization. -
AspNetUserTokens
: This table is used to store authentication tokens for users. These tokens are primarily utilized for features like password reset and email confirmation. Tokens are generated and stored in this table for each user. -
AspNetUserClaims
: This table stores claims associated with each user. Claims represent specific pieces of information about the user (e.g., name, email, role) and are used for authorization purposes.
The AspNetRoles
and AspNetRoleClaims
tables you mentioned are separate from the user-related tables and are related to role management:
-
AspNetRoles
: This table stores information about the available roles in your application. Each role has a unique ID and a name. -
AspNetRoleClaims
: This table stores claims associated with each role. Role claims represent specific pieces of information associated with a role (e.g., permissions, policies).
If you are not seeing data in the AspNetUserTokens
and AspNetUserClaims
tables, it might indicate that no tokens or additional claims have been generated or associated with the users at the moment.
Remember that data in these tables will be populated as you perform specific actions such as generating tokens, associating claims with users, or using external login providers.
Please note that this is a general explanation, and the actual behavior and table structures may vary based on your specific implementation and any customizations you have made.
作者:Chuck Lu GitHub |
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 全程不用写代码,我用AI程序员写了一个飞机大战
· DeepSeek 开源周回顾「GitHub 热点速览」
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 记一次.NET内存居高不下排查解决与启示
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
2022-07-13 net use映射网盘和本地磁盘 How to Map Network Drives From the Command Prompt in Windows
2021-07-13 What is difference between “git checkout -f” and “git reset --hard HEAD”?
2021-07-13 What are the differences between .gitignore and .gitkeep?
2020-07-13 Comparison Review: Microsoft SSDT vs Redgate SQL Source Control
2020-07-13 Azure DevOps Azure Repos Git How-to Guides Use SSH key authentication
2019-07-13 de4dot 反混淆
2019-07-13 GreyMagic