Skip to content

cannot log in #611

Open
Open
@fengchunqi

Description

@fengchunqi

i cannot log in this

  • vscode: v1.47.3
  • node: v12.18.3
  • leetcode: v0.17.0

errorInfo

leetcode.vscode-leetcode-0.17.0\node_modules\vsc-leetcode-cli\lib\plugins\leetcode.js:589
const authenticityToken = body.match(/name="authenticity_token" value="(.*?)"/);
^
TypeError: Cannot read property 'match' of undefined

plugin.githubLogin = function(user, cb) {
  const urls = config.sys.urls;
  const leetcodeUrl = urls.github_login;
  const _request = request.defaults({jar: true});
  _request(urls.github_login_request, function(e, resp, body) {
    const authenticityToken = body.match(/name="authenticity_token" value="(.*?)"/); // The problem is here
    let gaId = body.match(/name="ga_id" value="(.*?)"/);
    if (!gaId) {
      gaId = '';
    }
    let requiredField = body.match(/name="required_field_(.*?)"/);
    const timestamp = body.match(/name="timestamp" value="(.*?)"/);
    const timestampSecret = body.match(/name="timestamp_secret" value="(.*?)"/);

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