Conversation
Only take auth via header or cookie. This requires a new version of lemmy-js-client for api tests to pass.
|
I'll start doing a lemmy-js-client RC for this rn. |
|
Okay that should be deployed soon, |
e6cc584 to
6699829
Compare
|
How to pass the auth to lemmy-js-client now? I think it should be held in LemmyHttp, but dont see anything in your PR. |
|
If I understand correctly and this is the part of the auth change that breaks backwards compat I'm still of the opinion this should only be done one version later (0.20) since there's not really a reason to do it now and that will mean apps won't have to implement version checking gymnastics and instantly break with 0.19. |
|
Version checking is not necessary, clients can send both the old auth param (in query/post param) as well as the auth cookie/header. Then it will work with both Lemmy 0.18 and 0.19. |
You can pass in headers, so you'd pass in the Cookie as a header. |
|
Okay thats working, check the last commit. Its a bit awkward having to hardcode the Lemmy URL in many different places, would be good if |
|
EDIT: okay I added a |
|
With |
|
|
|
Alright its passing locally. |
|
This needs another lemmy-js-client after #3869 is merged and I fixed conflicts. Pretty annoying to do this manually all the time. How about we move lemmy-js-client into this repo so it stays in sync with the Rust code automatically? |
|
Okay |
|
Still not working, |
|
Oops, forgot to add that. |
|
Pushed up. Sorry for these. |
|
Great, api tests are passing now so its good to merge. |
|
@Nutomic @dessalines once this gets merged I can start working on the UI side of blocking instances. |
|
Does the latest lemmy-ui (main branch) support this change? |
|
@alexandrupero not yet. It will soon though. |
Followup for #3725. Only take auth via header or cookie, not as query param. This requires a new version of lemmy-js-client for api tests to pass.