Skip to content

[React][aws-amplify-react]: Authenticator component does pass pass the 'signOut' event to child components  #2419

@lambda0xff

Description

@lambda0xff

Describe the bug
When wrapping components inside a custom <Authenticator>, auth events are correctly propagated to child components through props, except for 'signOut'

To Reproduce
Steps to reproduce the behavior:

const AlwaysOn = (props: any) => {
  console.log('Always on ', props.authState)
  return (
    <div>
      <div>I am always here to show current auth state: {props.authState}</div>
    </div>
  )
}

ReactDOM.render(
  <Authenticator hideDefault={true}>
    <AlwaysOn/>
    <SignUp />
    <SignIn />
    <App />
  </Authenticator>,
document.getElementById('root')

The AlwaysOn component does not correctly display the 'signOut' event

Expected behavior
A clear and concise description of what you expected to happen.
'signOut' event should be passed to child components

Metadata

Metadata

Assignees

Labels

ReactReact related issuesfeature-requestRequest a new feature

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions