Skip to content

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

Description

@18boys
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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions