Hello,
I am working on setting up a custom external authentication and am following the guidance from this documentation: External Authentication - ASP.NET Boilerplate. However, I’ve encountered a few issues in the process:
1- In ExternalAuthManager.cs, within the CreateProviderApi method, my new custom authentication provider does not appear in the _externalAuthConfiguration.ExternalLoginInfoProviders list; 2- When authenticating via the standard form-based authentication, TryAuthenticateAsync is called on my custom external authentication, which is not the intended behavior; 3- I am looking for a way to implement a new external authentication flow using tokens (similar to OpenIdConnect) rather than a username/password. Specifically, I aim to authenticate using the ExternalAuthenticate endpoint in the TokenAuthController;
Any guidance or insights on resolving these issues would be greatly appreciated.
Here's the code I'm using for the test:
1 Answer(s)
-
0
Hi klir
In order to define the custom provider you have added, you can define External Login in the
ConfigureExternalAuthProviders
method in*WebHostModule.cs
. If you are using MVC, you can do this in*WebMvcModule.cs
. This is the reason why it does not appear in ExternalLoginInfoProviders. If you want to use a tenant-based structure, you can define a class that will inherit TenantBasedExternalLoginInfoProviderBase.