microsoft / microsoft/30daysof
Error npx port auto(8080) different from redirect URI port.
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 183
- Forks
- 62
- Avg merge
- 17h 14m
- Merged PRs (30d)
- 1
Description
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

Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing package.json and auth.js, then compare their redirect-port settings with the redirect URI configured in the Azure portal. Reproduce the flow with npx http-server while port 8080 is unavailable; it is done when the running service's port matches the configured redirect URI and authentication completes successfully.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, javascript
- Domain
- authentication
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100