¡Hi! I’m a student from the University of Oviedo and I’m working on a routes management app called “Viade” with my team.
This week we started to code and I tried to create the logic for a login page so I went by using the Make a solid app on your lunch break tutorial but I encountered some problems.
The first problem was that the popup.htm file didn’t do anything. I searched for a solution and saw that I had to use a link for the “const popupUri” in main.js (you can see the code in the image at the end of the post).
The second problem was that when I tried to log out, the page didn’t change the interface. I thought that the problem was that I wasn’t logging out, but it seems that I was logging out and the solid.auth.trackSession wasn’t changing the interface.
I read about that method and I understood that when the session state changes it is invoked, but for some reason, it only works when I log in and don’t works when I log out.
Here is the code:
main,js
The rest of the files are the same from the tutorial (I would add more pictures, but I’m a new user and I can’t do it).
Also, here’s the link for the viade app, we currently only have some documentation, but we will add the rest day by day.
I used that code and it didn’t change the interface. However, I looked at the errors and warnings and It seems that I’m having an error on line 19 in the solid-auth-client.bundle.js:
I’ve seen this issue a few times - it’s actually the subject of a few closed bugs in solid-auth-client. Maybe this helps?
The solution there is to update your webpack configuration if you’re using it. Details in the comments.
If you’re not adverse to using React, the React Generator is designed to scaffold a whole application wiring up all this stuff automatically for you (including layouts for private vs public, and handling login/logout for you)
Keep in mind that that tutorial is pretty old and doesn’t cover writing data to a Pod. For a more fundamental introduction to the concepts behind writing a Solid app, it might be a good idea to work your way through the documentation on solidproject.org first.
I have not installed the library with npm, I’m using the .js file that the tutorial provided so I don’t have a webpack.common.config.js file to change (or maybe I can’t find where that configuration is).
And thank you for the generator, We are going to use React for Viade so you have helped us so much I’m going straight away to use it