solid-contrib / solid-node-client

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

How can I know why my login failled? ( feature request?) #15

Closed joeitu closed 2 years ago

joeitu commented 2 years ago

Hello :)

I'm using solid-node-client to login my CSS instance. When running:


const auth = require('solid-node-client');
const client = new auth.SolidNodeClient();

const session = await client.login({ idp, username, password });

Then, the value of session is:

{
  isLoggedIn: false,
  info: { isLoggedIn: false },
  fetch: [Function: bound ],
  logout: [Function: logout]
}

But I have no idea why the login failed.

Is it possible to get a more verbose fail so I can understand more why my login fail?

If this is not already possible, I think it would be a pretty useful new feature!

Cheers

jeff-zucker commented 2 years ago

Username and password login is only supported on NSS. For all other servers, you must login with a JWT web token. AFAIK, JWT failed logins should give you a verbose error message. You're right that the method should be say something when the username/password fails too. Not sure when I'll have time to fix it, but it's now on the list. Thanks for reporting!

joeitu commented 2 years ago

Thanks! I will give it a try with the web token then