I use multiplatform Kotlin to compile shared business logic to JVM and Javascript. The frontend then uses Typescript+React/Redux while the backend is a Kotlin Spring app with Postgres.
The Baeldung Spring Security course helped a lot.
If in a hurry though you can always use an external service like Auth0. I had that setup in an afternoon whereas understanding OAuth 2 and Spring Security took a week.