30daysof icon indicating copy to clipboard operation
30daysof copied to clipboard

Error npx port auto(8080) different from redirect URI port.

Open NovoaDev opened this issue 2 years ago • 0 comments

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

Error when redirecting Error8080

My solution

Manually assign a port that is free.

  1. Modify package.json. PackageMod

  2. Modify redirection aad.portal.azure configuration. SpaaadappMod

  3. Modify redirectUri in archive auth.js. AuthjsMod

Raise the service again and it worked :P 200OK

NovoaDev avatar Nov 20 '22 16:11 NovoaDev