Search code examples
javascriptreactjsamazon-web-servicesauthenticationaws-amplify

How to hide sign out button on Amplify auth default configuration?


How can I hide the sign out button of amplify default configuration for auth?

I'm using this config to apply Amplify Auth:

export default withAuthenticator(App, true);

This button: enter image description here


Solution

  • I searched a lot about and took me some time to find this answer, so I'll post it here to help more users:

    To the Sign Out default button (generated by the default configuration on amplify add auth) you need to pass this props on withAuthenticator HOC:

    export default withAuthenticator(App, { includeGreetings: true }); 
    

    To see more about withAuthenticator HOC check this super hidden docs here