From 1ca8c80af1c7f5a572144d5d7939bd00fb781d34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A9=99=E5=AD=90?= <454313500@qq.com> Date: Wed, 10 Jan 2024 23:07:07 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0token=E8=BF=94?= =?UTF-8?q?=E5=9B=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Services/Authentication/AuthService.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application/Services/Authentication/AuthService.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application/Services/Authentication/AuthService.cs index 60c8fc75..ecdbf68c 100644 --- a/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application/Services/Authentication/AuthService.cs +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application/Services/Authentication/AuthService.cs @@ -40,7 +40,7 @@ namespace Yi.Framework.Rbac.Application.Services.Authentication /// /// [HttpGet("auth/oauth/login/{scheme}")] - public async Task AuthOauthLoginAsync([FromRoute] string scheme, [FromQuery] string code) + public async Task AuthOauthLoginAsync([FromRoute] string scheme, [FromQuery] string code) { (var openId, var _) = await GetOpenIdAndNameAsync(scheme); var authEntity = await _repository.GetAsync(x => x.OpenId == openId && x.AuthType == scheme); @@ -50,7 +50,7 @@ namespace Yi.Framework.Rbac.Application.Services.Authentication throw new UserFriendlyException("第三方登录失败,请先注册后,在个人中心进行绑定该第三方后使用"); } var accessToken = await _accountManager.GetTokenByUserIdAsync(authEntity.UserId); - return accessToken; + return new { token= accessToken }; } ///