30daysof
30daysof copied to clipboard
Error npx port auto(8080) different from redirect URI port.
Error npx port auto(8080) different from redirect URI port.
In case someone gets the same thing that happens to me 😊. In my case npx http-server assign a different port than 8080 sometimes 8081/8082 depending on the ports it has busy. This causes it to redirect to another service after getting the token and throwing an error.
Error scenario
Service up on 8081
Error when redirecting
My solution
Manually assign a port that is free.
-
Modify package.json.
-
Modify redirection aad.portal.azure configuration.
-
Modify redirectUri in archive auth.js.
Raise the service again and it worked :P