如何使用MVC将oauth登录详细信息保存到数据库而不是解决方案 [英] How to save oauth login details into database instead of solution using MVC

查看:76
本文介绍了如何使用MVC将oauth登录详细信息保存到数据库而不是解决方案的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用OAuth使用gmail OAuth凭据登录我的MVC 5项目。它工作正常,但在这里我需要将登录数据保存到数据库而不是.mdf文件(这是在创建解决方案时自动创建的)。



如何保存这些表数据(即AspNetUserLogins和其他5个)到sql server数据库。



先谢谢了。



我尝试了什么:



在谷歌搜索中找不到解决方案..有没有完美的方法来管理这些东西。

I am using OAuth to login for my MVC 5 project using gmail OAuth credentials. Its working fine but here i have to need save login data to database instead of .mdf file (Which was created automatically when solution created).

How its possible to save these tables data (i.e. AspNetUserLogins and 5 other) to sql server database.

Thanks in advanced.

What I have tried:

No solution found on google search.. Is there any perfect way to manage these things.

推荐答案

你知道Visual Studio 2012+中的创建新网站实际上是自动为你做的吗?



以下是一个视频,引导您完成它:如何使用Asp.net MVC 5添加OAuth和openID - YouTube [ ^ ]
You know that the "create new website" in Visual studio 2012+ actually does this automatically for you right?

Here is a video that walks you through it: How to add OAuth and openID using Asp.net MVC 5 - YouTube[^]


这篇关于如何使用MVC将oauth登录详细信息保存到数据库而不是解决方案的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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