SolidOS / mashlib

Solid-compatible data mashup library and Data Browser
https://solidos.github.io/mashlib/dist/browse.html
MIT License
71 stars 21 forks source link

auth-upgrade : mashlib.min.js display the old login/logout #127

Closed bourgeoa closed 2 years ago

bourgeoa commented 2 years ago

Jeff Zucker @jeff-zucker oct. 05 18:51 @bourgeoa the test server is still completely messed up. Look at these two files, they are identical except that one uses /mashlib.js and the new login flow and other uses /mashlib.min.js and the old login flow. Just click on the two login buttons to see. This means that it is really impossible to test the new auth. Please re-investigate, something is very wrong. https://jeff-zucker.solidcommunity.net:8443/test/mash.html and https://jeff-zucker.solidcommunity.net:8443/test/mashmin.html

jeff-zucker commented 2 years ago

That proves nothing. Will you please try the two files and ecplain to me why mashlib.js behaves differently than mashlib.min.js? If the files are the same, why do they behave differently? I have evidence that something is wrong. Unless you can explain that, telling me that you grepped for one line is worthless.

bourgeoa commented 2 years ago

@jeff-zucker I am not trying to prove anything, just setting some facts. I opened the issue because it is an issue.

I can confirm the problem on my own server https://bourgeoa.ga:8443, on https://localhost:8443 multiuser

I tried all the above with the latest mashlib@1.7.5-beta and new versions with a rebuild of mashlib using npm ci or npm install to recreate the dependencies.

I have no explanation nor any idea where to look at. The mashlib.min.js is created directly by webpack --production and not using any specific plugin.

jeff-zucker commented 2 years ago

Ok, thanks. Sorry if I sound accusatory, I know you are doing great work. It is definitely a very perplexing thing. Is it possible that the npm install on nss does not pick up the latest mashlib because of versioning problems (e.g. mashlib 1.7.5 beta may not pick up the latest commit version).?

bourgeoa commented 2 years ago

No I don't think so :

I replaced the default webpack minifier with the terser-webpack-plugin, in build I saw it is used and there is absolutely no change. I also checked that the files in mashlib/dist have all the same build dates. It is the case

timea-solid commented 2 years ago

For reference I post here the places where Alain found still references to old auth: in Mashlib solid-auth-client is used in : solid-ui tests jest.mock jest.mock('solid-auth-client', () => ({ currentSession: () => Promise.resolve(), trackSession: () => null }))

solid-ui/examples/header

meeting-pane

timea-solid commented 2 years ago

Minified pb solved with commit: https://github.com/solid/mashlib/commit/93a50177b19b5e0d86b88a14a70afede03003ad5

timea-solid commented 2 years ago

Cleaning solid-ui storybook example: https://github.com/solid/solid-ui/commit/6c07e9203ae0e45485a94d13ef39dafcb1f1834a and: https://github.com/solid/solid-ui/commit/065c4ce3456c10b76491f31d9249866038314690

timbl commented 2 years ago

Why was the line in commit: 93a5017 there anyway? Should we also remove the lines on either side which pull in rdflib and solid-ui explicitly by path?

timea-solid commented 2 years ago

Clean up of solid-ui tests: https://github.com/solid/solid-ui/commit/bfd04f96682724df50e3a607dc19a684666c6e0a It touches a lot of test files because each one was mocking the lib. Due to the SolidLogic auth-upgrade changes, this mock is not needed any more. All tests pass.

bourgeoa commented 2 years ago

@theRealImy I published mashlib@1.7.5-beta.0 with only your patch, but :

timbl commented 2 years ago

I just built NSS on auth-upgrade and tests passed. Maybe a difference is my mashlib removes the other two differences between production and dev

jeff-zucker commented 2 years ago

Please test against local versions of https://jeff-zucker.solidcommunity.net:8443/test/mash.html and https://jeff-zucker.solidcommunity.net:8443/test/mashmin.html - that is where the error shows up when the two identical login buttons do different things.

timea-solid commented 2 years ago

Profile-pane cleanup: https://github.com/solid/profile-pane/pull/22

timea-solid commented 2 years ago

Meeting-pane was cleaned: https://github.com/solid/meeting-pane/commit/cea12d093722407c9153bdd3640f04e2b73cc21e

timea-solid commented 2 years ago

Update to Activitystreams-pane: https://github.com/solid/activitystreams-pane/tree/auth-upgrade

timea-solid commented 2 years ago

Update to markdown-pane: https://github.com/solid/markdown-pane/tree/auth-upgrade

bourgeoa commented 2 years ago

solved with mashlib@1.7.5.-beta.2