title: AWS Cognito, checking if authenticated user is in group or is admin using amplify
body: <p>I'm trying to identify if the authenticated user is admin or not, by checking if it belongs to a specific group.
  I'm using amplify in my React application and tried several methods, such as <code>Auth.currentUserInfo()</code>, <code>Auth.currentAuthenticatedUser()</code> and also getting the jwt token to see if somehow it's returned in the token, but I didn't find any information regarding that.
  I saw some people saying that exists a <code>payload cognito:groups</code> in the token <a href="https://stackoverflow.com/questions/52878146/aws-cognito-how-to-get-users-group-from-token-object">here</a>, but that may be changed, because in my returned token it does not exists.</p>
  <p>Another thing that I thought would work is the scope that comes in the jwt (aws.cognito.signin.user.admin), but it seems that every created user using amplify is returning this scope.</p>
  <p>Is it possible to check if an authenticated user belongs to a group or if it's an admin user from cognito?</p>