C#C
C#13mo ago
heyimenes

✅ Route Doesn't Trigger When Called Externally

Hi, I need some help with this issue. I've tried everything but still can't find the solution.
Here's my code:

c#
[HttpGet]
[Route("auth/discord/callback")]
public async Task<IActionResult> Callback([FromQuery] string code)
{
  Return Ok();
}


When I get a callback from Discord, it sends me the following URL:
http://localhost:7201/auth/discord/callback?code=REAL_CODE


However, the callback doesn't seem to detect it. But if I manually input a code like:
http://localhost:7201/auth/discord/callback?code=123123

the callback detects it.
What could be the reason for this behavior?
Was this page helpful?