jonashackt/spring-boot-vuejs

Secure with Spring Security & protect Vue frontend part incl. Login

paulvi opened this issue · 5 comments

Could here be extending to show how to secure with Spring Security and configure Vue.js to work together?

Are you aware of example for that?

Good point, we should have an example implementation for this topic. But I don't know, when I will have the time for it, PRs always welcome :)

Hey @paulvi a simple implementation of a secured backend resource is now included - together with a protected frontend part. Have fun!

We should also have a solution how to check on a secured part in the backend, whether the user was already logged in before successfully - because with the current solution, only the frontend (vuex store) knows this "auth state".

Simply storing the credentials inside vuex store and submitting them with every backend call from the frontend should do the trick (and help digital-bauhaus/Ferienpass#27 without the need to build a user management, registration system with JWT tokens)

We did using Basic Authentication (and TLS secured connections)

Note that JWT is stateless, so there is no sessions on server, it may be good or bad.
And it was unacceptable for our case.

JWT is also not the only token possible, there were too many ways before.