Skip to content
This repository was archived by the owner on May 2, 2022. It is now read-only.
This repository was archived by the owner on May 2, 2022. It is now read-only.

SyntaxError: Unexpected token } in JSON at position 3 when login #8

@linonetwo

Description

@linonetwo

I'm trying to login to LDP idp: 'https://localhost:8443/'

(node:53800) UnhandledPromiseRejectionWarning: SyntaxError: Unexpected token } in JSON at position 3
    at JSON.parse (<anonymous>)
    at SolidClient.performLogin (/xxx/node_modules/@solid/cli/src/SolidClient.js:186:31)
      const consentUrl = new URL(authUrl);
      const search = consentUrl.search.substring(1);
      let consPostData = JSON.parse('{"' + decodeURIComponent(search).replace(/"/g, '\\"').replace(/&/g, '","').replace(/\=/g, '":"') + '"}');

where search is "", so JSON to be parsed will be {""}

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