I think I am misunderstanding something here. I want to edit the auth response so I have made these classes:
public class CustomFacebookAuthProvider : FacebookAuthProvider, IAuthResponseFilter
{
public CustomFacebookAuthProvider(IAppSettings appSettings) : base(appSettings)
{
}
public void Execute(AuthFilterContext authContext)
{
//edit stuff
}
}
public class CustomCredentialsAuthProvider : CredentialsAuthProvider, IAuthResponseFilter
{
public CustomCredentialsAuthProvider(IAppSettings appSettings) : base(appSettings)
{
}
public void Execute(AuthFilterContext authContext)
{
//edit stuff
}
}
When I log in with either credentials or facebook both method get executed. Should only the auth provider being used be called or is it intended for this method to fire always on every auth provider regardless of which one is being used?
On both classes the authContext.AuthProvider
is JwtAuthProvider
. Is there a property I can use to determine which auth provider is being used? authContext.AuthRequest.Provider
is null (all properties of AuthRequest are null).