Codespace asp.net core v7 authentication POST returns 404 #50435
Replies: 2 comments 3 replies
-
Hello @mikedice 👋 The only issue with this is that the URL might change depending on the port you use for forwarding the app, unless you make it as standard on your app that it should be forwarded on a particular port. The other option I see is to set up a device code authentication so that you don't have to worry about the callback at all. You can find more information on setting up an AAD authentication provider here. Hope this helps! |
Beta Was this translation helpful? Give feedback.
-
🕒 Discussion Activity Reminder 🕒 This Discussion has been labeled as dormant by an automated system for having no activity in the last 60 days. Please consider one the following actions: 1️⃣ Close as Out of Date: If the topic is no longer relevant, close the Discussion as 2️⃣ Provide More Information: Share additional details or context — or let the community know if you've found a solution on your own. 3️⃣ Mark a Reply as Answer: If your question has been answered by a reply, mark the most helpful reply as the solution. Note: This dormant notification will only apply to Discussions with the Thank you for helping bring this Discussion to a resolution! 💬 |
Beta Was this translation helpful? Give feedback.
-
Question: How to forward POST request in codespace
Body
I have set up a repo with an asp.net core v7 project in it and added the code to use authentication for Microsoft Account (MSA). The auth flow, in a nutshell is GET request to the server which returns a redirect to login.microsoftonline.com which after user is authenticated does a POST request back to my app with all the stuff required to identify the authenticated user. In asp.net core I have full Info level logging turned on. This app is running in a codespace with port forwarding. This is what I see
From this I conclude the POST request never made it through the Codespace port forwarder and into the app running inside the container. In the container I right clicked on the forwarded port and changed visibility to public. Still same issue. No POST request being forwarded. This blocks development of apps that use this type of auth flow (oauth)
Any ideas on how to debug or fix would be appreciated.
Beta Was this translation helpful? Give feedback.
All reactions