I don't write it from scratch obviously but I roll my own using well known libraries or frameworks. Sorry but Auth-As-a-Service products are too expensive for smaller companies and putting the auth in someone's hand gives me the creeps. I don't mind an open source self installable model though if something like that existed.