Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

server.js和 client.js 中获取 url 错误 #1

Open
18boys opened this issue Jan 24, 2018 · 0 comments
Open

server.js和 client.js 中获取 url 错误 #1

18boys opened this issue Jan 24, 2018 · 0 comments

Comments

@18boys
Copy link

18boys commented Jan 24, 2018

const handleLogin = () => {
    const loginURI = '/api/user/login_by_token';
    const { AUTH_SERVER } = options;
    let ret = qualifyURL(loginURI, true);
    let redirectURL = AUTH_SERVER  + '?ret=' + ret;
    location.href = redirectURL;
  }

中不应该取AUTH_SERVER,应该取loginUrl
下面的才是正确滴

 const loginURI = '/api/user/login_by_token';
    const { loginUrl } = options;
    let ret = qualifyURL(loginURI, true);
    let redirectURL = loginUrl  + '?redirectUrl=' + ret;
    location.href = redirectURL;

同理 server.js 中

 request(loginUrl + token, function (error, response, body) {

loginUrl 也错了,应该是AUTH_SERVER

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant