Hey everyone! I've been working as a full-stack developer for about a year now, focusing on a B2B Data Analytics Platform for my company. My tech stack includes Vite and React for the front end, alongside AWS cloud services and Serverless Framework for the backend.
I've already set up Google OIDC in my Cognito user pool to facilitate Google Single Sign-On for my multitenant app. However, I'm running into issues when trying to configure Microsoft OIDC with Azure's 'common' endpoint. I'm curious if it's possible to manage multitenancy directly between AWS Cognito and Microsoft Azure, or if I should consider using middleware like Auth0 or WorkOS.
What do you think would be my best move? Thanks for any help, and I apologize if I have any misconceptions—I'm just trying to learn and improve!
5 Answers
The 'common' endpoint from Azure can be tricky with Cognito since it often expects tenant-specific endpoints. You might need to use those specific Azure endpoints, or alternatively, using something like Auth0 could be a good way to handle the multi-tenant setup without too much hassle.
I’m curious, is using Vite really a part of your stack or just a bundler for you? I'd love to know how you're integrating it with your current setup!
You might want to think twice before jumping into Auth0 just for cost reasons. You can actually make Cognito work; try using specific tenant IDs instead of the 'common' endpoint. It may take some work, but it's feasible!
I get that you need multitenancy, but I'm pretty sure Cognito only allows one issuer URL. However, if you go with multiple OIDC configurations in your Cognito user pool and hardcode each issuer, would that still be scalable? Just tossing around ideas!
Auth0 definitely works really well but it can become pricey as you scale up, especially with Monthly Active Users (MAUs). If you're willing to put in a bit more effort, you could create a small middleware to link Azure and Cognito. It really comes down to whether you prefer the convenience of Auth0 or want to manage more of the complexity yourself.

Related Questions
How to Build a Custom GPT Journalist That Posts Directly to WordPress
Cloudflare Origin SSL Certificate Setup Guide
How To Effectively Monetize A Site With Ads