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 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
![DiferentPortNpx](https://user-images.githubusercontent.com/21259250/202913484-a723fc83-4e60-431c-bd5f-0d00c1156bf8.png)
Error when redirecting![Error8080](https://user-images.githubusercontent.com/21259250/202913500-2353b292-3dd8-4942-9441-fd2b831d030b.png)
My solution
Manually assign a port that is free.
Modify package.json.![PackageMod](https://user-images.githubusercontent.com/21259250/202913518-34853c80-82e4-4914-af5a-2eab5bd1492a.png)
Modify redirection aad.portal.azure configuration.![SpaaadappMod](https://user-images.githubusercontent.com/21259250/202913526-33c0eab3-7fc4-48b9-bfe5-8fcbeaa2546f.png)
Raise the service again and it worked :P![200OK](https://user-images.githubusercontent.com/21259250/202913538-b8e55775-0f8c-48ce-9eb9-1d3dc7f7a55c.png)