title: Is possible to create a role based application with OAuth2?
body: <p>What I'm trying to do is to create an application with Angular frontend and Spring Boot backend with OAuth2 authentication.<br></p>
  
  <p>The issue is that I don't know how to get on the frontend the ROLES user has so that I'll be able, for instance, to show something role-based on the page.<br> Yes, there are scopes that OAuth provides in the response but the problem is that these scopes are for the CLIENT but not for the specific USER itself. And that CLIENT is my frontend side (correct me if I'm wrong) which basically means that every user operating my application(client) going to have the same scopes(roles).<br> Moreover, I can specify roles on the backend with the help of <code>Spring</code> and <code>UserDetailsService</code> and then use those roles with <code>@PreAuthorize</code>, etc. But not on the frontend side.</p>
  
  <p>Just as an example, if I simply used single JWT then with a token itself I'd return both the username and roles to frontend. And then I could store that data and use it on the frontend side according to my needs. </p>
  
  <p>So <strong>what I'm asking is</strong> if it's actually possible and if this is correct to do so?
  And how can I possibly implement such behavior?</p>