S
SolidJS•10mo ago
aminya

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
GitHub
GitHub - aminya/solid-auth0 at update
A wrapper on top of auth0-spa-js for solidjs. Contribute to aminya/solid-auth0 development by creating an account on GitHub.
1 Reply
Prohar 🕉
Prohar 🕉•10mo ago
asking the astro community would be better ig
Want results from more Discord servers?
Add your server