aminya
aminya
SSolidJS
Created by aminya on 3/8/2024 in #support
Solid Contexts with Astro for authentication
I am writing a reusable context for authenticating with Auth0, and there are two parts to it. Logging in via a button at the nav-bar that is in a separate Astro file that imports the Solid Login button, and another call that gets the token from the same context in another content Astro file that imports the Solid component for getting the token. The two files are then merged into a single page. However, I cannot get the conection between the two working since they are in separate astro files. The only way I could work around it was to not use a context, and globally create a Auth0 client and import it in both files. Is there a better solution? Here's the code https://github.com/aminya/solid-auth0/tree/update
2 replies