【问题标题】:How to hide sign out button on Amplify auth default configuration?如何隐藏 Amplify auth 默认配置上的退出按钮?
【发布时间】:2020-05-03 19:29:22
【问题描述】:

如何隐藏放大认证默认配置的退出按钮?

我正在使用此配置来应用 Amplify Auth:

export default withAuthenticator(App, true);

这个按钮:

【问题讨论】:

    标签: javascript reactjs amazon-web-services authentication aws-amplify


    【解决方案1】:

    我搜索了很多并花了一些时间找到这个答案,所以我将它发布在这里以帮助更多用户:

    要退出默认按钮(由amplify add auth 上的默认配置生成),您需要在 withAuthenticator HOC 上传递此道具:

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

    要了解有关withAuthenticator HOC 的更多信息,请查看这个超级hidden docs here

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2012-03-16
      • 2015-01-09
      • 1970-01-01
      • 1970-01-01
      • 2013-03-26
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多