我目前正在尝试整合Auth0的自定义登录表单,如其网站one of the many overrides所示。成功登录后,我在我的URL中获得了访问令牌,但从未调用过parseAuthHash方法。
ReactDOM.render(
<Provider store={store}>
<Router history={browserHistory}>
<Route path="/" component={Landing}/>
<Route path="/login" component={Login} auth={auth}/>
<Route path="/dashboard" component={Dashboard} onEnter={requireAuth} />
<Route path="access_token=:token" onEnter={parseAuthHash} />
</Router>
</Provider>,
app);
我的路由器看起来像这样。
n = 0; a = 21; b = 0; c = 0; y = 37.6991; T = 18.5; z = 0.1591; d = 0; f = 15.3049; q = 2.2391e4; e = 5; x = 60;
while n < x
a = a + b
c = y*(T-a)/z;
d = f*c;
b = d/q;
n = n + e;
end
我找到了一种解决问题的方法,包括在页面加载时手动解析url,这是我不想要做的事情。