solid-contrib / solid-node-client

a nodejs client for Solid
MIT License
20 stars 8 forks source link

Custom login gives TypeError in getAuthFetcher #10

Open Jmolenberghs opened 3 years ago

Jmolenberghs commented 3 years ago

When I'm trying to use a custom login I get

(node:36065) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'length' of null
    at Object.getAuthFetcher (/mnt/70D8F8E6D8F8AC0A/Documents/courses/stage/projects/nodeSolidAPI/node_modules/solid-auth-fetcher/dist/obtainAuthHeaders.js:11:29)
    at SolidNodeClient.<anonymous> (/mnt/70D8F8E6D8F8AC0A/Documents/courses/stage/projects/nodeSolidAPI/node_modules/solid-node-client/src/index.js:100:67)
    at step (/mnt/70D8F8E6D8F8AC0A/Documents/courses/stage/projects/nodeSolidAPI/node_modules/solid-node-client/src/index.js:33:23)
    at Object.next (/mnt/70D8F8E6D8F8AC0A/Documents/courses/stage/projects/nodeSolidAPI/node_modules/solid-node-client/src/index.js:14:53)
    at fulfilled (/mnt/70D8F8E6D8F8AC0A/Documents/courses/stage/projects/nodeSolidAPI/node_modules/solid-node-client/src/index.js:5:58)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)

Node.js
session = await client.login({
            idp: "https://inrupt.net",
            username: "<appropriateUserNme",
            password: "<appropriate password>",
            debug: true
        });

it used to work with solid-auth-cli

Jmolenberghs commented 3 years ago

@jeff-zucker , I updated my post on the forum. It was not a typo, but my password ending with an ampersand. After changing my password on the ipd, with the reset procedure, the login doesn't produce the error. But when I change it to another password, again ending with an ampersand, the error is back.

image

jeff-zucker commented 3 years ago

My apologies, of course, it was not a typo. I've deleted my comment above. And I'll look into what I might need to escape on my end. So the issue will remain open until I find out about that.