I use AI coding agents almost every day, and I still read every change they make. One thing I’ve noticed, in my own code and in a lot of projects I see online, is that the login part usually works. You sign in, you get a token, the dashboard loads. It looks done. But “who is this user?” and “what is this user allowed to do?” are two different questions, and a lot of apps only really answer the first one.
That’s the difference between authentication and authorization. Authentication checks who you are. Authorization checks what you can do. When an agent writes a frontend that hides the “Delete” button for normal users, it feels secure. It isn’t. Anyone with a valid token can skip your UI and call the API directly.
So when I read this beginner tutorial from JetBrains on securing Kotlin and Spring Boot APIs with OAuth 2.0 and JWT, I was happy to read it.
What the tutorial covers
It starts with the fundamentals: authentication vs authorization, the roles in OAuth2, and how a JWT is structured.…