From 7e1a3fe57731f84b375af46fd351c73657ccec7e Mon Sep 17 00:00:00 2001 From: Yuze Fu Date: Fri, 12 Jul 2024 18:45:55 +0900 Subject: [PATCH] fix: add some scope --- Net.Vatprc.Uniapi/Controllers/AuthController.cs | 3 ++- Net.Vatprc.Uniapi/Services/VatsimAuthService.cs | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Net.Vatprc.Uniapi/Controllers/AuthController.cs b/Net.Vatprc.Uniapi/Controllers/AuthController.cs index f4074c3..1478fdc 100644 --- a/Net.Vatprc.Uniapi/Controllers/AuthController.cs +++ b/Net.Vatprc.Uniapi/Controllers/AuthController.cs @@ -53,7 +53,8 @@ public IActionResult Login() .SetQueryParam("client_id", Options.Value.ClientId) .SetQueryParam("redirect_uri", Options.Value.RedirectUri) .SetQueryParam("code_challenge", challenge) - .SetQueryParam("code_challenge_method", "S256"); + .SetQueryParam("code_challenge_method", "S256") + .SetQueryParam("scope", "full_name email"); Response.Cookies.Append("code_verifier", verifier, new CookieOptions { HttpOnly = true, diff --git a/Net.Vatprc.Uniapi/Services/VatsimAuthService.cs b/Net.Vatprc.Uniapi/Services/VatsimAuthService.cs index 5dbe164..2740854 100644 --- a/Net.Vatprc.Uniapi/Services/VatsimAuthService.cs +++ b/Net.Vatprc.Uniapi/Services/VatsimAuthService.cs @@ -70,6 +70,7 @@ public async Task GetTokenAsync(string code, string verifier) redirect_uri = Options.Value.RedirectUri, code, code_verifier = verifier, + scope = "full_name email", }) .ReceiveJson(); return response;