From c4a4478b8c5f1ce33c86fffd1a134b8de57ead37 Mon Sep 17 00:00:00 2001 From: nikita Date: Thu, 26 Dec 2024 15:46:30 +0300 Subject: [PATCH] refactor: standardize the order of arguments --- Endpoint/Controllers/V1/AuthController.cs | 4 ++-- Security/Services/OAuthService.cs | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Endpoint/Controllers/V1/AuthController.cs b/Endpoint/Controllers/V1/AuthController.cs index 7bf58f9..93ab423 100644 --- a/Endpoint/Controllers/V1/AuthController.cs +++ b/Endpoint/Controllers/V1/AuthController.cs @@ -83,7 +83,7 @@ public class AuthController(IOptionsSnapshot user, IOptionsSnapshot user, IOptionsSnapshot logger, Dictionary logger, Dictionary [.. providers.Select(x => (x.Key, new Uri(redirectUri.TrimEnd('/') + "/?provider=" + (int)x.Key)))]; - public async Task LoginOAuth(HttpContext context, CookieOptions cookieOptions, + public async Task LoginOAuth(CookieOptions cookieOptions, HttpContext context, string redirectUrl, string code, string state, CancellationToken cancellation = default) { var result = new LoginOAuth() @@ -326,7 +326,8 @@ public class OAuthService(ILogger logger, Dictionary GetOAuthUser(HttpContext context, CookieOptions cookieOptions, string token, CancellationToken cancellation = default) + public async Task<(OAuthUser? User, string? Message, bool IsSuccess)> + GetOAuthUser(CookieOptions cookieOptions, HttpContext context, string token, CancellationToken cancellation = default) { var requestInfo = new RequestContextInfo(context, cookieOptions);