I am trying to authenticate a request using either Google or my Identity Server. I want a user to login using a token from Id server 4, or from Google. However, I can't figure out how to use both authentication middlewares. If I pass the id_token for google, it passes on the first middleware (UseJwtBearerAuthentication) but fails on the second one (UseIdentityServerAuthentication). How can I make it so that it doesn't throw error when it actually passes on at least 1 authentication middleware? For example, if it passes on the first middleware, the second middleware is ignored? Do I need to create a custom one that checks if user is already authenticated? Am I missing a property that I should set for both middleware options? Thanks.
I am trying to authenticate a request using either Google or my Identity Server. I want a user to login using a token from Id server 4, or from Google. However, I can't figure out how to use both authentication middlewares. If I pass the id_token for google, it passes on the first middleware (UseJwtBearerAuthentication) but fails on the second one (UseIdentityServerAuthentication). How can I make it so that it doesn't throw error when it actually passes on at least 1 authentication middleware? For example, if it passes on the first middleware, the second middleware is ignored? Do I need to create a custom one that checks if user is already authenticated? Am I missing a property that I should set for both middleware options? Thanks.