question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Hub not firing for signIn event after calling Auth.signIn()

See original GitHub issue

Describe the bug In other projects, I am used to the Hub providing a message when a signIn occurs. I cannot get the simplest log to occur for a signIn event in a new project. Other events are working.

When I call Auth.signIn(), it succeeds. I get no errors in my code. I can tell it succeeds because if I refresh my browser I see the “configured” event go to my Hub callback, and then I call Auth.currentAuthenticatedUser() which shows the user is logged in now.

To Reproduce

  1. npx create-react-app test-auth
  2. cd test-auth
  3. npm i -S aws-amplify
  4. amplify add auth (accept defaults)
  5. modify App.js with code shown below.

Expected behavior I should see a console.log for signIn events.

Code Snippet

// App.js
import React, { useCallback, useEffect, useState, } from 'react'
import {
  BrowserRouter as Router,
  Route,
  Switch,
} from "react-router-dom"

import Amplify, { Auth, } from 'aws-amplify'
import awsconfig from './aws-exports'

const authCheck = setUser => {
  Auth.currentAuthenticatedUser().then(u => {
    console.log('active session:', u)
    setUser(u)
  }).catch(e => {
    console.log('no user logged in:', e)
    setUser(null)
  })
}

export const authCallback = ({setConfigured, setUser}) => (authData) => {
  console.log(`==== amplify hub handle [${authData.payload.event}] event`, authData)
  authCheck(setUser)
}

const App = () => {
  const [configured, setConfigured] = useState(false)
  const [user, setUser] = useState(null)

  const signOutUser = useCallback(() => {
    return signOut().then(res => {
      setUser(null)
    })
  }, [setUser])

  useEffect(() => {
    if (configured) {
      return
    }

    const callback = authCallback({setConfigured, setUser})
    Hub.listen('auth', callback)
    Amplify.configure(awsconfig)

    return () => {
      Hub.remove('auth', callback)
    }
  }, [configured, setConfigured])

  return (
  <Router>
    <Switch>
      <Route exact path="/" render={({location}) => <Home {...{configured, user, location, signOutUser,}} />} />
    </Switch>
  </Router>
  )
}

export default App

What is Configured? If applicable, please provide what is configured for Amplify CLI:

  • Which steps did you follow via Amplify CLI when configuring your resources.
  1. amplify add auth
  • Which resources do you have configured?
    • If applicable, please provide your aws-exports file:
/* eslint-disable */
// WARNING: DO NOT EDIT. This file is automatically generated by AWS Amplify. It will be overwritten.

const awsmobile = {
    "aws_project_region": "us-west-2",
    "aws_cognito_identity_pool_id": "us-west-2:d87df562-4be1-4719-9c20-5df03370f579",
    "aws_cognito_region": "us-west-2",
    "aws_user_pools_id": "us-west-2_E7yIi6bBP",
    "aws_user_pools_web_client_id": "23urja4s0ap5tc9hnb43djdq4i",
    "oauth": {}
};


export default awsmobile;
aws cognito-idp describe-user-pool --user-pool-id us-west-2_xxxxxx
{
    "UserPool": {
        "Id": "us-west-2_E7yIi6bBP",
        "Name": "projectwebe2dff8e5_userpool_e2dff8e5-dev",
        "Policies": {
            "PasswordPolicy": {
                "MinimumLength": 8,
                "RequireUppercase": false,
                "RequireLowercase": false,
                "RequireNumbers": false,
                "RequireSymbols": false,
                "TemporaryPasswordValidityDays": 7
            }
        },
        "LambdaConfig": {},
        "LastModifiedDate": 1600652008.812,
        "CreationDate": 1600652008.812,
        "SchemaAttributes": [
            {
                "Name": "sub",
                "AttributeDataType": "String",
                "DeveloperOnlyAttribute": false,
                "Mutable": false,
                "Required": true,
                "StringAttributeConstraints": {
                    "MinLength": "1",
                    "MaxLength": "2048"
                }
            },
            {
                "Name": "name",
                "AttributeDataType": "String",
                "DeveloperOnlyAttribute": false,
                "Mutable": true,
                "Required": false,
                "StringAttributeConstraints": {
                    "MinLength": "0",
                    "MaxLength": "2048"
                }
            },
            {
                "Name": "given_name",
                "AttributeDataType": "String",
                "DeveloperOnlyAttribute": false,
                "Mutable": true,
                "Required": false,
                "StringAttributeConstraints": {
                    "MinLength": "0",
                    "MaxLength": "2048"
                }
            },
            {
                "Name": "family_name",
                "AttributeDataType": "String",
                "DeveloperOnlyAttribute": false,
                "Mutable": true,
                "Required": false,
                "StringAttributeConstraints": {
                    "MinLength": "0",
                    "MaxLength": "2048"
                }
            },
            {
                "Name": "middle_name",
                "AttributeDataType": "String",
                "DeveloperOnlyAttribute": false,
                "Mutable": true,
                "Required": false,
                "StringAttributeConstraints": {
                    "MinLength": "0",
                    "MaxLength": "2048"
                }
            },
            {
                "Name": "nickname",
                "AttributeDataType": "String",
                "DeveloperOnlyAttribute": false,
                "Mutable": true,
                "Required": false,
                "StringAttributeConstraints": {
                    "MinLength": "0",
                    "MaxLength": "2048"
                }
            },
            {
                "Name": "preferred_username",
                "AttributeDataType": "String",
                "DeveloperOnlyAttribute": false,
                "Mutable": true,
                "Required": false,
                "StringAttributeConstraints": {
                    "MinLength": "0",
                    "MaxLength": "2048"
                }
            },
            {
                "Name": "profile",
                "AttributeDataType": "String",
                "DeveloperOnlyAttribute": false,
                "Mutable": true,
                "Required": false,
                "StringAttributeConstraints": {
                    "MinLength": "0",
                    "MaxLength": "2048"
                }
            },
            {
                "Name": "picture",
                "AttributeDataType": "String",
                "DeveloperOnlyAttribute": false,
                "Mutable": true,
                "Required": false,
                "StringAttributeConstraints": {
                    "MinLength": "0",
                    "MaxLength": "2048"
                }
            },
            {
                "Name": "website",
                "AttributeDataType": "String",
                "DeveloperOnlyAttribute": false,
                "Mutable": true,
                "Required": false,
                "StringAttributeConstraints": {
                    "MinLength": "0",
                    "MaxLength": "2048"
                }
            },
            {
                "Name": "email",
                "AttributeDataType": "String",
                "DeveloperOnlyAttribute": false,
                "Mutable": true,
                "Required": true,
                "StringAttributeConstraints": {
                    "MinLength": "0",
                    "MaxLength": "2048"
                }
            },
            {
                "Name": "email_verified",
                "AttributeDataType": "Boolean",
                "DeveloperOnlyAttribute": false,
                "Mutable": true,
                "Required": false
            },
            {
                "Name": "gender",
                "AttributeDataType": "String",
                "DeveloperOnlyAttribute": false,
                "Mutable": true,
                "Required": false,
                "StringAttributeConstraints": {
                    "MinLength": "0",
                    "MaxLength": "2048"
                }
            },
            {
                "Name": "birthdate",
                "AttributeDataType": "String",
                "DeveloperOnlyAttribute": false,
                "Mutable": true,
                "Required": false,
                "StringAttributeConstraints": {
                    "MinLength": "10",
                    "MaxLength": "10"
                }
            },
            {
                "Name": "zoneinfo",
                "AttributeDataType": "String",
                "DeveloperOnlyAttribute": false,
                "Mutable": true,
                "Required": false,
                "StringAttributeConstraints": {
                    "MinLength": "0",
                    "MaxLength": "2048"
                }
            },
            {
                "Name": "locale",
                "AttributeDataType": "String",
                "DeveloperOnlyAttribute": false,
                "Mutable": true,
                "Required": false,
                "StringAttributeConstraints": {
                    "MinLength": "0",
                    "MaxLength": "2048"
                }
            },
            {
                "Name": "phone_number",
                "AttributeDataType": "String",
                "DeveloperOnlyAttribute": false,
                "Mutable": true,
                "Required": false,
                "StringAttributeConstraints": {
                    "MinLength": "0",
                    "MaxLength": "2048"
                }
            },
            {
                "Name": "phone_number_verified",
                "AttributeDataType": "Boolean",
                "DeveloperOnlyAttribute": false,
                "Mutable": true,
                "Required": false
            },
            {
                "Name": "address",
                "AttributeDataType": "String",
                "DeveloperOnlyAttribute": false,
                "Mutable": true,
                "Required": false,
                "StringAttributeConstraints": {
                    "MinLength": "0",
                    "MaxLength": "2048"
                }
            },
            {
                "Name": "updated_at",
                "AttributeDataType": "Number",
                "DeveloperOnlyAttribute": false,
                "Mutable": true,
                "Required": false,
                "NumberAttributeConstraints": {
                    "MinValue": "0"
                }
            }
        ],
        "AutoVerifiedAttributes": [
            "email"
        ],
        "UsernameAttributes": [
            "email"
        ],
        "SmsVerificationMessage": "Your verification code is {####}",
        "EmailVerificationMessage": "Your verification code is {####}",
        "EmailVerificationSubject": "Your verification code",
        "VerificationMessageTemplate": {
            "SmsMessage": "Your verification code is {####}",
            "EmailMessage": "Your verification code is {####}",
            "EmailSubject": "Your verification code",
            "DefaultEmailOption": "CONFIRM_WITH_CODE"
        },
        "MfaConfiguration": "OFF",
        "EstimatedNumberOfUsers": 1,
        "EmailConfiguration": {
            "EmailSendingAccount": "COGNITO_DEFAULT"
        },
        "SmsConfiguration": {
            "SnsCallerArn": "arn:aws:iam::842392745927:role/snse2dff8e5183011-dev",
            "ExternalId": "projectwe2dff8e5_role_external_id"
        },
        "UserPoolTags": {},
        "AdminCreateUserConfig": {
            "AllowAdminCreateUserOnly": false,
            "UnusedAccountValidityDays": 7
        },
        "Arn": "arn:aws:cognito-idp:us-west-2:842392745927:userpool/us-west-2_E7yIi6bBP"
    }
}
Environment
$ npx envinfo --system --binaries --browsers --npmPackages --npmGlobalPackages
npx: installed 1 in 2.613s

  System:
    OS: Linux 4.19 Ubuntu 20.04 LTS (Focal Fossa)
    CPU: (8) x64 Intel(R) Core(TM) i7-4712MQ CPU @ 2.30GHz
    Memory: 3.00 GB / 6.10 GB
    Container: Yes
    Shell: 5.0.16 - /bin/bash
  Binaries:
    Node: 12.18.0 - ~/.nvm/versions/node/v12.18.0/bin/node
    npm: 6.14.8 - ~/.nvm/versions/node/v12.18.0/bin/npm
  npmPackages:
    @material-ui/core: ^4.11.0 => 4.11.0 
    @material-ui/icons: ^4.9.1 => 4.9.1 
    @testing-library/jest-dom: ^5.11.4 => 5.11.4 
    @testing-library/react: ^11.0.4 => 11.0.4 
    @testing-library/user-event: ^12.1.4 => 12.1.4 
    ajv: ^6.12.5 => 6.12.5 
    aws-amplify: ^3.3.1 => 3.3.1 
    deepdown: ^1.0.7 => 1.0.7 
    react: ^16.13.1 => 16.13.1 
    react-dom: ^16.13.1 => 16.13.1 
    react-router-dom: ^5.2.0 => 5.2.0 
    react-scripts: ^3.4.3 => 3.4.3 
  npmGlobalPackages:
    @aws-amplify/cli: 4.29.2
    npm: 6.14.8

Laptop

  • OS: [Windows 10 - WSL Ubuntu]
  • Browser
Google Chrome 85.0.4183.102 (Official Build) (64-bit) (cohort: Stable)
Revision ffe848af6a5df4fa127e2929331116b7f9f1cb30-refs/branch-heads/4183@{#1770}
OS Windows 10 OS Version 2004 (Build 19041.508)

Additional context ** I turned on the debug mode to provide more info for us by setting window.LOG_LEVEL = ‘DEBUG’; **

APP START SHOWING LOGIN
[HMR] Waiting for update signal from WDS...
App.js:63 theme {breakpoints: {…}, direction: "ltr", mixins: {…}, overrides: {…}, palette: {…}, …}
ConsoleLogger.ts:99 [DEBUG] 48:11.704 Amplify - amplify config {aws_project_region: "us-west-2", aws_cognito_identity_pool_id: "us-west-2:d87df562-4be1-4719-9c20-5df03370f579", aws_cognito_region: "us-west-2", aws_user_pools_id: "us-west-2_E7yIi6bBP", aws_user_pools_web_client_id: "23urja4s0ap5tc9hnb43djdq4i", …}
ConsoleLogger.ts:91 [DEBUG] 48:11.705 I18n - configure I18n
ConsoleLogger.ts:91 [DEBUG] 48:11.705 I18n - create I18n instance
ConsoleLogger.ts:91 [DEBUG] 48:11.706 AuthClass - configure Auth
ConsoleLogger.ts:99 [DEBUG] 48:11.706 Parser - parse config (3) [{…}, "to amplifyconfig", {…}]
ConsoleLogger.ts:99 [DEBUG] 48:11.707 Hub - Dispatching to auth with  {event: "configured", data: null, message: "The Auth category has been configured successfully"}
ConsoleLogger.ts:99 [DEBUG] 48:11.708 Hub - Dispatching to auth with  {event: "configured", data: null, message: "The Auth category has been configured successfully"}
ConsoleLogger.ts:99 [DEBUG] 48:11.709 AnalyticsClass - on hub capsule auth {event: "configured", data: null, message: "The Auth category has been configured successfully"}
ConsoleLogger.ts:99 [DEBUG] 48:11.709 Hub - Dispatching to auth with  {event: "configured", data: null, message: "The Auth category has been configured successfully"}
user-utils.js:18 ==== amplify hub handle [configured] event {channel: "auth", payload: {…}, source: "Auth", patternInfo: Array(0)}
ConsoleLogger.ts:91 [DEBUG] 48:11.712 AuthClass - getting current authenticated user
ConsoleLogger.ts:99 [DEBUG] 48:11.713 AnalyticsClass - configure Analytics {aws_project_region: "us-west-2", aws_cognito_identity_pool_id: "us-west-2:d87df562-4be1-4719-9c20-5df03370f579", aws_cognito_region: "us-west-2", aws_user_pools_id: "us-west-2_E7yIi6bBP", aws_user_pools_web_client_id: "23urja4s0ap5tc9hnb43djdq4i", …}
ConsoleLogger.ts:99 [DEBUG] 48:11.714 Parser - parse config (3) [{…}, "to amplifyconfig", {…}]
ConsoleLogger.ts:99 [DEBUG] 48:11.715 AWSPinpointProvider - configure Analytics {disabled: undefined, autoSessionRecord: true, aws_project_region: "us-west-2", aws_cognito_identity_pool_id: "us-west-2:d87df562-4be1-4719-9c20-5df03370f579", aws_cognito_region: "us-west-2", …}
ConsoleLogger.ts:99 [DEBUG] 48:11.715 Hub - Dispatching to analytics with  {event: "configured", data: null, message: "The Analytics category has been configured successfully"}
ConsoleLogger.ts:99 [DEBUG] 48:11.716 AnalyticsClass - on hub capsule analytics {event: "configured", data: null, message: "The Analytics category has been configured successfully"}
ConsoleLogger.ts:99 [DEBUG] 48:11.718 AnalyticsClass - current configuration {autoSessionRecord: true, aws_project_region: "us-west-2", aws_cognito_identity_pool_id: "us-west-2:d87df562-4be1-4719-9c20-5df03370f579", aws_cognito_region: "us-west-2", aws_user_pools_id: "us-west-2_E7yIi6bBP", …}
ConsoleLogger.ts:91 [DEBUG] 48:11.719 Storage - storage configure called
ConsoleLogger.ts:91 [DEBUG] 48:11.722 StorageClass - configure Storage
ConsoleLogger.ts:99 [DEBUG] 48:11.724 Parser - parse config (3) [{…}, "to amplifyconfig", {…}]
ConsoleLogger.ts:99 [DEBUG] 48:11.725 AWSS3Provider - configure Storage undefined
ConsoleLogger.ts:91 [DEBUG] 48:11.728 Storage - storage vault configure called
ConsoleLogger.ts:91 [DEBUG] 48:11.729 StorageClass - configure Storage
ConsoleLogger.ts:99 [DEBUG] 48:11.729 Parser - parse config (3) [{…}, "to amplifyconfig", {…}]
ConsoleLogger.ts:99 [DEBUG] 48:11.731 AWSS3Provider - configure Storage undefined
ConsoleLogger.ts:99 [DEBUG] 48:11.732 RestAPI - configure Rest API {opt: {…}}
ConsoleLogger.ts:91 [DEBUG] 48:11.733 RestAPI - create Rest API instance
ConsoleLogger.ts:99 [DEBUG] 48:11.734 RestClient - API Options {endpoints: Array(0), aws_project_region: "us-west-2", aws_cognito_identity_pool_id: "us-west-2:d87df562-4be1-4719-9c20-5df03370f579", aws_cognito_region: "us-west-2", aws_user_pools_id: "us-west-2_E7yIi6bBP", …}
ConsoleLogger.ts:99 [DEBUG] 48:11.735 PubSub - configure PubSub {opt: {…}}
ConsoleLogger.ts:99 [DEBUG] 48:11.735 GraphQLAPI - configure GraphQL API {opt: {…}}
ConsoleLogger.ts:91 [DEBUG] 48:11.736 GraphQLAPI - create Rest instance
ConsoleLogger.ts:99 [DEBUG] 48:11.737 RestClient - API Options {aws_project_region: "us-west-2", aws_cognito_identity_pool_id: "us-west-2:d87df562-4be1-4719-9c20-5df03370f579", aws_cognito_region: "us-west-2", aws_user_pools_id: "us-west-2_E7yIi6bBP", aws_user_pools_web_client_id: "23urja4s0ap5tc9hnb43djdq4i", …}
ConsoleLogger.ts:99 [DEBUG] 48:11.737 RestAPI - configure Rest API {opt: {…}}
ConsoleLogger.ts:91 [DEBUG] 48:11.738 RestAPI - create Rest API instance
ConsoleLogger.ts:99 [DEBUG] 48:11.738 RestClient - API Options {endpoints: Array(0), aws_project_region: "us-west-2", aws_cognito_identity_pool_id: "us-west-2:d87df562-4be1-4719-9c20-5df03370f579", aws_cognito_region: "us-west-2", aws_user_pools_id: "us-west-2_E7yIi6bBP", …}
ConsoleLogger.ts:99 [DEBUG] 48:11.739 GraphQLAPI - configure GraphQL API {opt: {…}}
ConsoleLogger.ts:91 [DEBUG] 48:11.740 GraphQLAPI - create Rest instance
ConsoleLogger.ts:99 [DEBUG] 48:11.741 RestClient - API Options {aws_project_region: "us-west-2", aws_cognito_identity_pool_id: "us-west-2:d87df562-4be1-4719-9c20-5df03370f579", aws_cognito_region: "us-west-2", aws_user_pools_id: "us-west-2_E7yIi6bBP", aws_user_pools_web_client_id: "23urja4s0ap5tc9hnb43djdq4i", …}
ConsoleLogger.ts:99 [DEBUG] 48:11.742 Interactions - configure Interactions {opt: {…}}
ConsoleLogger.ts:99 [DEBUG] 48:11.743 XR - configure XR {opt: {…}}
ConsoleLogger.ts:99 [DEBUG] 48:11.744 AbstractXRProvider - configure SumerianProvider {aws_project_region: "us-west-2", aws_cognito_identity_pool_id: "us-west-2:d87df562-4be1-4719-9c20-5df03370f579", aws_cognito_region: "us-west-2", aws_user_pools_id: "us-west-2_E7yIi6bBP", aws_user_pools_web_client_id: "23urja4s0ap5tc9hnb43djdq4i", …}
ConsoleLogger.ts:99 [DEBUG] 48:11.745 Predictions - configure Predictions {aws_project_region: "us-west-2", aws_cognito_identity_pool_id: "us-west-2:d87df562-4be1-4719-9c20-5df03370f579", aws_cognito_region: "us-west-2", aws_user_pools_id: "us-west-2_E7yIi6bBP", aws_user_pools_web_client_id: "23urja4s0ap5tc9hnb43djdq4i", …}
ConsoleLogger.ts:91 [DEBUG] 48:11.833 AuthClass - cannot load federated user from auth storage
ConsoleLogger.ts:91 [DEBUG] 48:11.833 AuthClass - get current authenticated userpool user
ConsoleLogger.ts:91 [DEBUG] 48:11.834 AuthClass - Failed to get user from user pool
ConsoleLogger.ts:99 [DEBUG] 48:11.835 AuthClass - The user is not authenticated by the error No current user
user-utils.js:12 no user logged in: not authenticated
ConsoleLogger.ts:93 [DEBUG] 50:42.850 AuthClass CognitoUserSession {idToken: CognitoIdToken, refreshToken: CognitoRefreshToken, accessToken: CognitoAccessToken, clockDrift: -6}
ConsoleLogger.ts:91 [DEBUG] 50:42.856 Credentials - removing aws-amplify-federatedInfo from storage
ConsoleLogger.ts:91 [DEBUG] 50:42.857 Credentials - set credentials from session
ConsoleLogger.ts:99 [DEBUG] 50:43.223 Credentials - Load credentials successfully {accessKeyId: "ASIA4IIUFG7DQ36PVCHZ", secretAccessKey: "UFK/BPnfJ7Q5Ph9IeAk4Z0kKoGExPM3dCWkSKWdc", sessionToken: "IQoJb3JpZ2luX2VjENv//////////wEaCXVzLXdlc3QtMiJGME…GKpFMO845Rwcm5lis3seT9An5yOytKQ48q/tAsaZx3PzXIHg3", expiration: Sat Sep 26 2020 12:50:48 GMT-0700 (Pacific Daylight Time)}
ConsoleLogger.ts:99 [DEBUG] 50:43.224 AuthClass - succeed to get cognito credentials {accessKeyId: "ASIA4IIUFG7DQ36PVCHZ", secretAccessKey: "UFK/BPnfJ7Q5Ph9IeAk4Z0kKoGExPM3dCWkSKWdc", sessionToken: "IQoJb3JpZ2luX2VjENv//////////wEaCXVzLXdlc3QtMiJGME…GKpFMO845Rwcm5lis3seT9An5yOytKQ48q/tAsaZx3PzXIHg3", expiration: Sat Sep 26 2020 12:50:48 GMT-0700 (Pacific Daylight Time), identityId: "us-west-2:d18f54dc-ef2b-40fc-b515-ff4cb38a6262", …}
ConsoleLogger.ts:99 [DEBUG] 50:43.372 Hub - Dispatching to auth with  {event: "signIn", data: CognitoUser, message: "A user fd27463c-4ae0-40f0-83c1-99a9fbde299f has been signed in"}
ConsoleLogger.ts:99 [DEBUG] 50:43.372 Hub - Dispatching to auth with  {event: "signIn", data: CognitoUser, message: "A user fd27463c-4ae0-40f0-83c1-99a9fbde299f has been signed in"}
ConsoleLogger.ts:99 [DEBUG] 50:43.372 AnalyticsClass - on hub capsule auth {event: "signIn", data: CognitoUser, message: "A user fd27463c-4ae0-40f0-83c1-99a9fbde299f has been signed in"}
Login.js:18 Login/signIn/authenticateAccount CognitoUser {username: "fd27463c-4ae0-40f0-83c1-99a9fbde299f", pool: CognitoUserPool, Session: null, client: Client, signInUserSession: CognitoUserSession, …}
SignIn.js:168 SignIn/onClickSubmitSignIn CognitoUser {username: "fd27463c-4ae0-40f0-83c1-99a9fbde299f", pool: CognitoUserPool, Session: null, client: Client, signInUserSession: CognitoUserSession, …}
BROWSER REFRESH AFTER LOGIN
[HMR] Waiting for update signal from WDS...
App.js:63 theme {breakpoints: {…}, direction: "ltr", mixins: {…}, overrides: {…}, palette: {…}, …}
ConsoleLogger.ts:99 [DEBUG] 31:34.822 Amplify - amplify config {aws_project_region: "us-west-2", aws_cognito_identity_pool_id: "us-west-2:d87df562-4be1-4719-9c20-5df03370f579", aws_cognito_region: "us-west-2", aws_user_pools_id: "us-west-2_E7yIi6bBP", aws_user_pools_web_client_id: "23urja4s0ap5tc9hnb43djdq4i", …}
ConsoleLogger.ts:91 [DEBUG] 31:34.823 I18n - configure I18n
ConsoleLogger.ts:91 [DEBUG] 31:34.823 I18n - create I18n instance
ConsoleLogger.ts:91 [DEBUG] 31:34.824 AuthClass - configure Auth
ConsoleLogger.ts:99 [DEBUG] 31:34.825 Parser - parse config (3) [{…}, "to amplifyconfig", {…}]
ConsoleLogger.ts:99 [DEBUG] 31:34.827 Hub - Dispatching to auth with  {event: "configured", data: null, message: "The Auth category has been configured successfully"}
ConsoleLogger.ts:99 [DEBUG] 31:34.828 Hub - Dispatching to auth with  {event: "configured", data: null, message: "The Auth category has been configured successfully"}
ConsoleLogger.ts:99 [DEBUG] 31:34.829 AnalyticsClass - on hub capsule auth {event: "configured", data: null, message: "The Auth category has been configured successfully"}
ConsoleLogger.ts:99 [DEBUG] 31:34.830 Hub - Dispatching to auth with  {event: "configured", data: null, message: "The Auth category has been configured successfully"}
user-utils.js:18 ==== amplify hub handle [configured] event {channel: "auth", payload: {…}, source: "Auth", patternInfo: Array(0)}
ConsoleLogger.ts:91 [DEBUG] 31:34.832 AuthClass - getting current authenticated user
ConsoleLogger.ts:99 [DEBUG] 31:34.835 AnalyticsClass - configure Analytics {aws_project_region: "us-west-2", aws_cognito_identity_pool_id: "us-west-2:d87df562-4be1-4719-9c20-5df03370f579", aws_cognito_region: "us-west-2", aws_user_pools_id: "us-west-2_E7yIi6bBP", aws_user_pools_web_client_id: "23urja4s0ap5tc9hnb43djdq4i", …}
ConsoleLogger.ts:99 [DEBUG] 31:34.836 Parser - parse config (3) [{…}, "to amplifyconfig", {…}]
ConsoleLogger.ts:99 [DEBUG] 31:34.837 AWSPinpointProvider - configure Analytics {disabled: undefined, autoSessionRecord: true, aws_project_region: "us-west-2", aws_cognito_identity_pool_id: "us-west-2:d87df562-4be1-4719-9c20-5df03370f579", aws_cognito_region: "us-west-2", …}
ConsoleLogger.ts:99 [DEBUG] 31:34.838 Hub - Dispatching to analytics with  {event: "configured", data: null, message: "The Analytics category has been configured successfully"}
ConsoleLogger.ts:99 [DEBUG] 31:34.839 AnalyticsClass - on hub capsule analytics {event: "configured", data: null, message: "The Analytics category has been configured successfully"}
ConsoleLogger.ts:99 [DEBUG] 31:34.840 AnalyticsClass - current configuration {autoSessionRecord: true, aws_project_region: "us-west-2", aws_cognito_identity_pool_id: "us-west-2:d87df562-4be1-4719-9c20-5df03370f579", aws_cognito_region: "us-west-2", aws_user_pools_id: "us-west-2_E7yIi6bBP", …}
ConsoleLogger.ts:91 [DEBUG] 31:34.841 Storage - storage configure called
ConsoleLogger.ts:91 [DEBUG] 31:34.842 StorageClass - configure Storage
ConsoleLogger.ts:99 [DEBUG] 31:34.843 Parser - parse config (3) [{…}, "to amplifyconfig", {…}]
ConsoleLogger.ts:99 [DEBUG] 31:34.844 AWSS3Provider - configure Storage undefined
ConsoleLogger.ts:91 [DEBUG] 31:34.845 Storage - storage vault configure called
ConsoleLogger.ts:91 [DEBUG] 31:34.846 StorageClass - configure Storage
ConsoleLogger.ts:99 [DEBUG] 31:34.847 Parser - parse config (3) [{…}, "to amplifyconfig", {…}]
ConsoleLogger.ts:99 [DEBUG] 31:34.848 AWSS3Provider - configure Storage undefined
ConsoleLogger.ts:99 [DEBUG] 31:34.850 RestAPI - configure Rest API {opt: {…}}
ConsoleLogger.ts:91 [DEBUG] 31:34.851 RestAPI - create Rest API instance
ConsoleLogger.ts:99 [DEBUG] 31:34.852 RestClient - API Options {endpoints: Array(0), aws_project_region: "us-west-2", aws_cognito_identity_pool_id: "us-west-2:d87df562-4be1-4719-9c20-5df03370f579", aws_cognito_region: "us-west-2", aws_user_pools_id: "us-west-2_E7yIi6bBP", …}
ConsoleLogger.ts:99 [DEBUG] 31:34.853 PubSub - configure PubSub {opt: {…}}
ConsoleLogger.ts:99 [DEBUG] 31:34.854 GraphQLAPI - configure GraphQL API {opt: {…}}
ConsoleLogger.ts:91 [DEBUG] 31:34.854 GraphQLAPI - create Rest instance
ConsoleLogger.ts:99 [DEBUG] 31:34.855 RestClient - API Options {aws_project_region: "us-west-2", aws_cognito_identity_pool_id: "us-west-2:d87df562-4be1-4719-9c20-5df03370f579", aws_cognito_region: "us-west-2", aws_user_pools_id: "us-west-2_E7yIi6bBP", aws_user_pools_web_client_id: "23urja4s0ap5tc9hnb43djdq4i", …}
ConsoleLogger.ts:99 [DEBUG] 31:34.857 RestAPI - configure Rest API {opt: {…}}
ConsoleLogger.ts:91 [DEBUG] 31:34.859 RestAPI - create Rest API instance
ConsoleLogger.ts:99 [DEBUG] 31:34.860 RestClient - API Options {endpoints: Array(0), aws_project_region: "us-west-2", aws_cognito_identity_pool_id: "us-west-2:d87df562-4be1-4719-9c20-5df03370f579", aws_cognito_region: "us-west-2", aws_user_pools_id: "us-west-2_E7yIi6bBP", …}
ConsoleLogger.ts:99 [DEBUG] 31:34.861 GraphQLAPI - configure GraphQL API {opt: {…}}
ConsoleLogger.ts:91 [DEBUG] 31:34.862 GraphQLAPI - create Rest instance
ConsoleLogger.ts:99 [DEBUG] 31:34.863 RestClient - API Options {aws_project_region: "us-west-2", aws_cognito_identity_pool_id: "us-west-2:d87df562-4be1-4719-9c20-5df03370f579", aws_cognito_region: "us-west-2", aws_user_pools_id: "us-west-2_E7yIi6bBP", aws_user_pools_web_client_id: "23urja4s0ap5tc9hnb43djdq4i", …}
ConsoleLogger.ts:99 [DEBUG] 31:34.864 Interactions - configure Interactions {opt: {…}}
ConsoleLogger.ts:99 [DEBUG] 31:34.866 XR - configure XR {opt: {…}}
ConsoleLogger.ts:99 [DEBUG] 31:34.867 AbstractXRProvider - configure SumerianProvider {aws_project_region: "us-west-2", aws_cognito_identity_pool_id: "us-west-2:d87df562-4be1-4719-9c20-5df03370f579", aws_cognito_region: "us-west-2", aws_user_pools_id: "us-west-2_E7yIi6bBP", aws_user_pools_web_client_id: "23urja4s0ap5tc9hnb43djdq4i", …}
ConsoleLogger.ts:99 [DEBUG] 31:34.869 Predictions - configure Predictions {aws_project_region: "us-west-2", aws_cognito_identity_pool_id: "us-west-2:d87df562-4be1-4719-9c20-5df03370f579", aws_cognito_region: "us-west-2", aws_user_pools_id: "us-west-2_E7yIi6bBP", aws_user_pools_web_client_id: "23urja4s0ap5tc9hnb43djdq4i", …}
ConsoleLogger.ts:91 [DEBUG] 31:34.957 AuthClass - cannot load federated user from auth storage
ConsoleLogger.ts:91 [DEBUG] 31:34.958 AuthClass - get current authenticated userpool user
user-utils.js:9 active session: CognitoUser {username: "fd27463c-4ae0-40f0-83c1-99a9fbde299f", pool: CognitoUserPool, Session: null, client: Client, signInUserSession: CognitoUserSession, …}

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:11 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
cyrfercommented, Oct 3, 2020

Dear Amplify, I understand the Hub to be a core feature of the library. Can I get some feedback??

0reactions
github-actions[bot]commented, Dec 26, 2021

This issue has been automatically locked since there hasn’t been any recent activity after it was closed. Please open a new issue for related bugs.

Looking for a help forum? We recommend joining the Amplify Community Discord server *-help channels or Discussions for those types of questions.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Amplify Hub.listen immediately calls signOut after signIn when ...
I'm having an issue implementing SSO with AWS Amplify into my React Native app. I have SSO working fine, however, when trying to...
Read more >
Listening for authentication events - JavaScript - Amplify Docs
In this guide you will learn how to use the Hub utility to listen for different authentication events. Amplify's Auth category publishes in...
Read more >
Login Status - Facebook SDK for JavaScript
auth.login. This event is fired when your app first notices the user (in other words, gets a session when it didn't already have...
Read more >
The Complete Guide to User Authentication with the Amplify ...
After you've created the Facebook & Google OAuth credentials move on to ... federatedSignIn() method from the Auth class from AWS Amplify.
Read more >
Bring your own UI - Amplify iOS Workshop
Auth.signIn() API instead of using the Cognito hosted UI. ... were discarded while the application was not running, this will be called shortly...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found