refactor: standardize the order of arguments

This commit is contained in:
nikita
2024-12-26 15:46:30 +03:00
parent 05166188be
commit c4a4478b8c
2 changed files with 6 additions and 5 deletions

View File

@ -83,7 +83,7 @@ public class AuthController(IOptionsSnapshot<Admin> user, IOptionsSnapshot<Gener
traceId,
true), "text/html");
var result = await oAuthService.LoginOAuth(HttpContext, GetCookieParams(),
var result = await oAuthService.LoginOAuth(GetCookieParams(), HttpContext,
HttpContext.GetApiUrl(Url.Action("OAuth2")!), code, state);
string? callbackUrl = null;
@ -136,7 +136,7 @@ public class AuthController(IOptionsSnapshot<Admin> user, IOptionsSnapshot<Gener
if (!callback.IsAbsoluteUri)
throw new ControllerArgumentException("The callback URL must be absolute.");
return Redirect(oAuthService.GetProviderRedirect(HttpContext, GetCookieParams(),
return Redirect(oAuthService.GetProviderRedirect(GetCookieParams(), HttpContext,
HttpContext.GetApiUrl(Url.Action("OAuth2")!),
(OAuthProvider)provider,
callback).AbsoluteUri);