-
Notifications
You must be signed in to change notification settings - Fork 57
Closed
Description
Previously, I was passing auth
to getSite()
in order to fetch the current user and their metadata.
It looks like the formData
param has been removed:
ab7af88#r128832008
Is there an alternative way to pass auth in?
example code
const lemmyClient = new LemmyHttp(`https://${instanceBase}`);
const auth = await lemmyClient.login({
username_or_email: username,
password: password,
});
// as long aws there is a JWT in the response from login, logged in!
if (auth.jwt) {
// this shows the `jwt` is present 👍
console.log("auth", auth);
// i tried this too, but didn't seem to work :/
lemmyClient.setHeaders({
Cookie: `jwt=${auth.jwt}`
});
// this no longer has any params
const getSite = await lemmyClient.getSite({
auth: auth.jwt,
});
// but never any user data here :(
console.log("getSite", getSite);
}
Edit: forgot to mention, this was after upgrading to 0.19.0-rc.13
from 0.18.1
NatoBoram
Metadata
Metadata
Assignees
Labels
No labels