I am wondering if it is possible to create a single Spring Boot 3 application that:
- serves HTML using Thymeleaf templates (some public, others restricted to logged in users)
- can be logged into using fx. Google or Facebook
- uses JWT for stateless 'session' (so I can have multiple instances of the backend behind load balancer
- have support for CSRF
- have JSON REST API endpoints that frontend can call when JWT is valid (user is logged in)
I've found many tutorials for Spring Boot + Thymeleaf + Social login, or Spring Boot + JWT etc but none have both social login, Thymeleaf, REST API using JWT.
So my question is if this is at all possible and if anyone have a link to a blog post or article showing how to combine all of the above requirements in a single solution?
Источник: https://stackoverflow.com/questions/781 ... wt-for-api
Мобильная версия