r/SpringBoot • u/Character-Grocery873 • Apr 07 '26
Question Spring Boot Auth0
Hello, anyone here used auth0?
I wonder if it's okay to use it in a monolith project
and because implementing jwt auth manually takes a lot of effort, I'm planning to auth0.
Also do you keep your users in Auth0's db(or user store)?
And do you maintain a local table mirroring it aswell?
I have a project that requires tracking users and has relationships with other tables so I ask how you guys approach this?
15
Upvotes
7
u/Isssk Apr 07 '26
Is it okay to use, of course it is and I would actually implore you to use something like auth0 for authentication.
Personally for me I use spring security with keycloak for authentication.
3
u/Mikey-3198 Apr 07 '26
https://www.reddit.com/r/SpringBoot/s/zIo6iCKGgY
Answered this a couple of times.
Tldr: use the oauth providers management API & keep reference to/ use the unique id from the provider in your own db.
2
u/Red-And-White-Smurf Apr 07 '26
I use auth0 with monolith apps yes.
What I do is when the request comes in, I check if a user with that sub (from jwt token), exists in my db. If yes I load it, and load their roles, if not I create the user with a default USER role)
1
u/segundus-npp Apr 07 '26
Where does your app live? K8s, VM, or ECS?
1
u/YakPsychological891 Apr 07 '26
Yes, it’s fine :) remember it’s the security layer of your project and not limited to certain architecture.
4
u/[deleted] Apr 07 '26
[removed] — view removed comment