【问题标题】:Useragent not working in react-native-webview用户代理在 react-native-webview 中不起作用
【发布时间】:2019-06-22 02:09:13
【问题描述】:

无法从 webview 通过 google 登录

我正在使用 react-native-webview 并尝试从 webview 通过 google 登录

错误:disallowed_useragent

从 firebase web 实现 google 登录

 <WebView style={styles.WebViewStyle}
      userAgent={DeviceInfo.getUserAgent()}
      automaticallyAdjustContentInsets={false}
      source={{ uri: 'MY_URL' }}
      onLoad={() => this.hideSpinner()} />

【问题讨论】:

    标签: firebase react-native webview google-signin


    【解决方案1】:

    使用这个:-

    userAgent="Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.36"
    

    【讨论】:

      猜你喜欢
      • 2017-04-30
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-04-26
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多