r/SpringBoot • • Jun 01 '26 • Bravo 1

Question First time using Keycloak with Spring Boot — confused about JWT vs DB sync (need guidance + examples)

Hi everyone,

I’m a beginner working on my first project using Spring Boot + Keycloak, and I’m a bit confused about the correct architecture. Any suggestions, video links, or GitHub project examples would be really helpful

What I understand so far:

  • Keycloak handles authentication (login, registration, roles)
  • Spring Boot acts as a resource server and validates JWT tokens
  • My app has its own database for business logic (users, orders, etc.)

My confusion:

User data during registration
If a user registers in Keycloak, how should I handle extra fields like:

  • phone number
  • address
  • app-specific profile data

What I’m looking for:

Since this is my first time using Keycloak, any of the following would really help:

  • Best practice explanation
  • Real-world architecture examples
  • GitHub repos using Spring Boot + Keycloak properly
  • YouTube videos or tutorials that actually follow production patterns

Thanks in advance

30 Upvotes

15 comments sorted by

View all comments

Show parent comment

2

u/nh_bt Jun 01 '26

Then explain it or provide the link for good explanation. Or your comment is useless.

1

u/xiaopewpew Jun 01 '26

Why is it useless? im pointing OP in the right direction to ask a better question next time. Software engineering isnt something you can learn by being spoon fed. Not to mention there are literally namesake websites to teach you what the two concepts are.