In a previous greenfield project (pre-LLM) I considered using Cognito since I was all-in on AWS (Lambda, DynamoDB, ApiG, Route53, S3, SQS/SNS, and the list goes on...) but after reading through the docs I wanted to pull my hair out. What I thought was going to be a time-saving measure turned into a quagmire. Even with my level of "lock in" I was not willing to hand over auth and so I rolled my own (and it worked fine).
Nowadays I can't imagine using a 3rd-party for something like auth (or many other things) due to lock-in and also just always needing to conform to their way of doing things.
Apologies for the non-sequitur but 2 days ago I saw FreshDesk had deleted my account (free plan) that I had been using (sparingly, <50 tickets total if I had to guess) for 3+ years. No email, no notice, just deleted my account and broke the sites that I had integrated their feedback widget into. I reached out to see what was going on and they pretty much told me I had to upgrade if I wanted my account back.
Now 1-2 years ago I would have considered paying. In fact I would have considered paying IF they had contacted me to say "pay up or we will delete" but the fact they deleted it without any contact meant FreshDesk was dead to me. I started, for all of 1 minute, to consider the alternatives before I fired up Claude and in <2hrs I had a full replacement for all the parts of FreshDesk I was using (basic ticketing, emails, statuses, file upload).
The build-vs-buy decision has completely flipped for me. I have a hard time thinking of paying for something my platform depends on, especially auth, when it's so easy to build it now.
Side Note: that "all-in" AWS project? Yeah, with Claude's help I'm off 90% of the AWS's services and while it's still hosted there I can move to any VPS if I want now that I've removed my dependencies on AWS-specific concepts. It's been glorious and it has the side effect of meaning my local dev more-closely matches the deployed code since there isn't AWS-magic I have to fake anymore.
Auth is a bit of a different beast when it comes to the build vs buy debate though. A competent auth provider has the infrastructure (and necessary data) to deflect against DDoS attacks, bots, etc.