The Wayback Machine - https://web.archive.org/web/20200915124126/https://github.com/LeetCode-OpenSource/vscode-leetcode/issues/611
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

cannot log in #611

Open
frenchleave1007 opened this issue Aug 5, 2020 · 0 comments
Open

cannot log in #611

frenchleave1007 opened this issue Aug 5, 2020 · 0 comments

Comments

@frenchleave1007
Copy link

@frenchleave1007 frenchleave1007 commented Aug 5, 2020

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="(.*?)"/);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
1 participant
You can’t perform that action at this time.