Closed SiliconOrchid closed 4 years ago
So if I understand the issue - the custom domain is bound to the AFD and not to the web app, the redirect uri being sent on the OAuth redirect is to your custom domain but Webapps rejects this because it doesn't map to the webapps name.
Can you confirm the initial redirect to the auth provider includes the correct domain name rather than the azurewebsites.net
domain? You should see a 302 from your site to the GH provider in the network traffic and should include the redirect_uri in the query string.
I've seen a similar but not the same issue with WebApps and Application Gateway and we end up re-writing the request & response to change the URLs to ensure the OAuth flow works as expected.
EDIT: digging a little further I think these posts may help - depends a little on your precise setup though https://edi.wang/post/2020/6/29/solving-azure-ad-sign-in-failure-with-azure-front-door https://www.phillipsj.net/posts/using-azure-front-door-with-dotnet-core/
Incidentally, you should qualify for a free TLS cert on your custom domain bound directly to WebApp so AFD wouldn't be necessary for your primary reason for using AFD
@shahiddev Thanks for your input and comments 👍
@shahiddev -
Following a conference call between myself, @Layla-P , @CrypticEngima and @rickvdbosch :
Context: Current hosting is currently comprised:
Problem: OAuth redirect from GitHub, back to our service, is failing with "Correlation Error". Our server is determining that it has a different name, to that specified by the callback URL.
This is happening because the OAuth redirect back from GitHub is to "www.prtracker.net", but our webApp is not aware of this hostname - it thinks it is "xyz.azurewebsites.net" (the underlying hostname). The use of "www.prtracker.net" domain is actually a network redirect, from the Azure Frontdoor service.
Initial testing:
Next Steps:
Error Screenshot:
(note: server error messages were temporarily enabled to obtain this screenshot)