webview中的React-Native 302重定向

时间:2016-09-14 18:58:04

标签: ssl webview oauth-2.0 react-native url-redirection

麻烦得到react-native oauth2登录流程在本机中工作。我在heroku上有一个ssl服务器处理服务器auth,并且auth流程在浏览器中工作。但是,在react-native webview中,我认为它会自动跟随重定向。相反,我得到了这个问题an ssl error

有什么东西我不见了?在网上找不到任何帮助来解决这个问题。

我只是有一个简单的webview实现。

import React, { Component } from 'react';
import { WebView } from 'react-native';

export default class SfLogin extends Component {
  constructor(props) {
  super(props);

  this.state = {
     uri: 'https://testendpoint/shouldredirectwhenhit'
  }
}

  render() {
    return (
      <WebView
        javaScriptEnabled={true}
        domStorageEnabled={true}
        source={{uri: this.state.uri}}
        style={{marginTop: 20}}
        scalesPageToFit={true}
      />
    );
  }
}

提前致谢

0 个答案:

没有答案