Default Auth Provider for /auth route

I’d like to be able to modify the auth service endpoints so that /auth uses a default provider that I set. I have a custom provider and will also be using jwt.

I have overridden the serviceroute for AuthenticateService to “/auth” only. However, I’ve yet to figure out how to default this to my custom provider when JWTAuthProvider is also included.

Is there a way to now set the default?

I thought of possibly adding a request filter and setting the provider there when it’s empty for the request, but hoping there might be a simpler way.?

No you’ll need to provide an explicit route for the Auth Provider you’re using, e.g. /auth/credentials - a naked /auth route is used to determine whether or not the user is authenticated, where a 401 response indicates they’re not.

Also the JWT Auth Provider should never be calling the /auth route as the authentication is performed per-request so you’ll just access the protected route directly, supplying the JWT Bearer token along with the request.

ok thanks. guess i’ll just have to work with that.