fix: OAuth 认证无法登录
This commit is contained in:
parent
d18ff584e9
commit
381dcc40ff
|
@ -80,7 +80,7 @@
|
|||
"HomePath": "/Admin/Profiles",
|
||||
"Scope": [ "user_info", "projects" ],
|
||||
"Roles": [ "Administrators" ],
|
||||
"App": "0",
|
||||
"App": "Demo",
|
||||
"StarredUrl": "https://gitee.com/api/v5/user/starred/LongbowEnterprise/BootstrapAdmin"
|
||||
},
|
||||
"GitHubOptions": {
|
||||
|
@ -91,7 +91,7 @@
|
|||
"HomePath": "/Admin/Profiles",
|
||||
"Scope": [ "user_info", "repo" ],
|
||||
"Roles": [ "Administrators" ],
|
||||
"App": "0",
|
||||
"App": "Demo",
|
||||
"StarredUrl": "https://api.github.com/user/starred/ArgoZhang/BootstrapAdmin"
|
||||
},
|
||||
"WeChatOptions": {
|
||||
|
@ -102,14 +102,14 @@
|
|||
"HomePath": "/Admin/Profiles",
|
||||
"Scope": [ "snsapi_login" ],
|
||||
"Roles": [ "Administrators" ],
|
||||
"App": "0"
|
||||
"App": "Demo"
|
||||
},
|
||||
"SMSOptions": {
|
||||
"CompanyCode": "<CompanyCode>",
|
||||
"MD5Key": "MD5Key",
|
||||
"Roles": [ "Administrators" ],
|
||||
"HomePath": "/Admin/Profiles",
|
||||
"App": "0"
|
||||
"App": "Demo"
|
||||
},
|
||||
"TencentSMSOptions": {
|
||||
"AppId": "<TencentAppId>",
|
||||
|
|
|
@ -84,7 +84,7 @@
|
|||
"HomePath": "/Home/Index",
|
||||
"Scope": [ "user_info", "projects" ],
|
||||
"Roles": [ "Default" ],
|
||||
"App": "2"
|
||||
"App": "Demo"
|
||||
},
|
||||
"GitHubOptions": {
|
||||
"Enabled": true,
|
||||
|
@ -94,7 +94,7 @@
|
|||
"HomePath": "/Home/Index",
|
||||
"Scope": [ "user_info", "repo" ],
|
||||
"Roles": [ "Default" ],
|
||||
"App": "2"
|
||||
"App": "Demo"
|
||||
},
|
||||
"WeChatOptions": {
|
||||
"Enabled": true,
|
||||
|
@ -104,14 +104,14 @@
|
|||
"HomePath": "/Admin/Profiles",
|
||||
"Scope": [ "snsapi_login" ],
|
||||
"Roles": [ "Default" ],
|
||||
"App": "0"
|
||||
"App": "Demo"
|
||||
},
|
||||
"SMSOptions": {
|
||||
"CompanyCode": "<CompanyCode>",
|
||||
"MD5Key": "MD5Key",
|
||||
"Roles": [ "Default" ],
|
||||
"HomePath": "/Home/Index",
|
||||
"App": "2"
|
||||
"App": "Demo"
|
||||
},
|
||||
"TencentSMSOptions": {
|
||||
"AppId": "<TencentAppId>",
|
||||
|
|
|
@ -98,7 +98,7 @@ namespace Bootstrap.DataAccess
|
|||
/// <param name="roles"></param>
|
||||
internal static void SaveUser(User newUser, IEnumerable<string> roles)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(newUser.Id))
|
||||
if (string.IsNullOrEmpty(newUser.Id))
|
||||
{
|
||||
var uid = UserHelper.Retrieves().FirstOrDefault(u => u.UserName == newUser.UserName)?.Id;
|
||||
var user = DbContextManager.Create<User>();
|
||||
|
|
Loading…
Reference in New Issue