I am currently spearheading a project to rearchitect our authentication, and we've signed on with Auth0 as a vendor that will manage the authentication component (for the time being - authorization will be an on-premise solution until we have migrated our suite of ~30 products to use the authentication middleware layer in question).

I have the overarching concept in my head, but I can't seem to be able to go further than a design when it comes to implementing it, and I am more than sure it's the smallest of things that I'm tripping up on.

I am following the Auth0 Backed For Frontend guide and this is essentially what I'm trying to recreate, but injecting another layer that simply abstracts the Auth0 segment, so that if we decide in the future to proceed with another authentication provider, we can (as simply as practicable) change out the provider by implementing minimal changes.

Is this feasible, or am I over-complicating a design whereby I can simply insert the Auth0 Authentication logic into each one of my applications independently, and remove the requirement to have another independent Authentication Service which every other application depends on by making calls to?

I am beyond novice when it comes to designing solutions, so any and all feedback will help drive my architectural decisions.

  • The middleware you're describing sound like an API Gateway solution with authentication; There are quite a few off-the-shelf solutions for this sort of thing already, for example konghq.com/blog/kong-gateway-oauth2 Oct 19, 2022 at 7:37


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy