title: Amplify I can't get the Sub and other attributes of a user registered with oauth
body: <p>I need to get attributes of a user when they log in with oauth. Currently Hub.listen returns me some user data like this:</p>
  <pre><code>{
    &quot;Session&quot;: null, 
    &quot;authenticationFlowType&quot;: &quot;USER_SRP_AUTH&quot;, 
    &quot;client&quot;: {
      &quot;endpoint&quot;: &quot;https://cognito-idp.us-east-1.amazonaws.com/&quot;, 
      &quot;fetchOptions&quot;: [Object]
    }, 
    &quot;keyPrefix&quot;: &quot;CognitoIdentityServiceProvider.vifuv747v73gj48v&quot;, 
    &quot;pool&quot;: {
      &quot;advancedSecurityDataCollectionFlag&quot;: true, 
      &quot;client&quot;: [Client], 
      &quot;clientId&quot;: &quot;vifuv747v73gj48v&quot;, 
      &quot;storage&quot;: [Function MemoryStorage], 
      &quot;userPoolId&quot;: &quot;us-east-1_gkfke8e&quot;, 
      &quot;wrapRefreshSessionCallback&quot;: [Function anonymous]
    }, 
    &quot;signInUserSession&quot;: {
      &quot;accessToken&quot;: [CognitoAccessToken], 
      &quot;clockDrift&quot;: 0, 
      &quot;idToken&quot;: [CognitoIdToken], 
      &quot;refreshToken&quot;: [CognitoRefreshToken]
    }, 
    &quot;storage&quot;: [Function MemoryStorage], 
    &quot;userDataKey&quot;: &quot;CognitoIdentityServiceProvider.sdfj656fs5efsdf45es.Google_0000000000000000000000.userData&quot;, 
    &quot;username&quot;: &quot;Google_0000000000000000000000&quot;
  }
  </code></pre>
  <p>Also I can't access them with: <code>currentAuthenticatedUser()</code></p>
  <pre><code>const { attributes } = await Auth.currentAuthenticatedUser();
  //attributes === undefined
  </code></pre>
  <p>When a user registers I have to perform certain tasks in the database, etc. Therefore I would like to know how to identify if the login by oauth created a new account to perform the necessary tasks. Or, failing that, to be able to access the sub for me to check if that user already existed and perform the tasks in case it is a new user</p>