C
C#5mo 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();
}
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
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
http://localhost:7201/auth/discord/callback?code=123123
the callback detects it. What could be the reason for this behavior?
1 Reply
Unknown User
Unknown User5mo ago
Message Not Public
Sign In & Join Server To View

Did you find this page helpful?