填充 AspNetUserLogins 和 AspNetUserTokens [英] Populating AspNetUserLogins and AspNetUserTokens

查看:19
本文介绍了填充 AspNetUserLogins 和 AspNetUserTokens的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试了很多来自 Internet 的示例(例如 firstsecond 等),一切正常,除了表 AspNetUserLogins 和 AspNetUserTokens成功登录和生成令牌后不显示任何数据.

I've tried quite a few examples from the internet (e.g. first, second and others) and everything works fine except the fact that tables AspNetUserLogins and AspNetUserTokens don't show any data after successful login and token generation.

为什么会发生这种情况,我该如何解决?

Why is this happening and how can I fix it?

推荐答案

AspNetUserTokens表用于存储外部认证令牌,由SignInManager.UpdateExternalAuthenticationTokensAsync方法填充.内部身份验证令牌默认存储在内存中,如果要将它们存储到数据库中,则必须创建自己的表和自己的逻辑来存储.

The table AspNetUserTokens is for external authentication token storage and is filled by SignInManager.UpdateExternalAuthenticationTokensAsync method. Internal authentication tokens are stored in memory by default and if you want to store them into the database, you must create your own table and your own logic to store.

这篇关于填充 AspNetUserLogins 和 AspNetUserTokens的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆