What is the OAuth2 callback URL for an ASP.Net Core Application

When I setup an ASP.Net Core MVC application, and add in the AspNetCore Authentication libraries, it handles the handshakes for OAuth 2 and OIDC's Code Authentication Flow.

However, I need to configure my Identity Provider with the callback URL to send the code to my application.

Assuming my Application is hosted at https://example.com/myapp/home what would be the callback URL that I should say my application is expecting the IDP to call?


Solution 1:

The default callback URL for AddOpenIdConnect in ASP.NET core is

/signin-oidc

In your case (Depending on your configuration) it could be:

https://example.com/signing-oidc

You can if necessary, customize the URL that the handler is looking for using the CallbackPath property.

What happens when it is called is the following:

enter image description here