solid-contrib / solid-node-client

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

username / password not working #21

Closed biagioboi closed 1 year ago

biagioboi commented 1 year ago

Hi there, since the Token access is not supported anymore, i'm trying to access to my pod hosted by Solid Community provider using username and password, nothing happen.

import {IDENTITY_PROVIDER, USERNAME, PASSWORD} from "./config.mjs";
import { SolidNodeClient } from 'solid-node-client';
const client = new SolidNodeClient({
    appUrl : "https://solid-node-client", // Optional, to set your custom app URL
});
let session = await client.login({
    idp : IDENTITY_PROVIDER, // e.g. https://solidcommunity.net
    username: USERNAME,
    password : PASSWORD,
});

when i log session.isLoggedIn, it always returns false.

Am i missing something?

PS. I know that the username/password method only works on an Node Solid Server, Solid Community is one of them.

biagioboi commented 1 year ago

Problem solved, note that identity provider url must be written without ending "/", otherwise path to request will be https://solidcommunity.net//login/password. Please consider to handle with this problem by advertising the current url requested or something similar.