I need to update an older project using SolidJS and Astro. I only need Discord and Reddit login, and I want to host the auth setup myself. Database integration is optional. What would you use?
What self-hosted OAuth options work with SolidJS and Astro?
Answers
For just two providers, implementing the OAuth flow yourself is an option. Most of the work is making requests and handling the responses, but don't skip state validation or assume both providers behave identically.
Check each provider's current documentation for its authorization and token endpoints, scopes, callback requirements, and PKCE support. You'll also need to decide how your app creates and maintains its own session after login. It gives you control without a framework-specific dependency, but you own the security and maintenance.
Reply to this answer
Passport.js is worth a look if you want a library rather than writing the flows yourself. Check the provider integrations and how they fit your Astro server setup before committing. You'll still need to handle sessions and configuration.
Reply to this answer
Zitadel is another option if you're open to running a separate authentication service rather than adding a small library to the app. Check whether its current provider integrations cover both Discord and Reddit and whether the extra service is worth it for your project.
Reply to this answer
Ideal Auth is another library to check out. Before choosing it, verify its current maintenance status, provider support, and whether it can run in your self-hosted setup. Those details matter more here than whether it has a Solid-specific integration.
Reply to this answer
Lucia has been used for Discord OAuth, but there was a report that it was recently deprecated. I'd check its current status before building a new setup around it, especially if you're trying to get away from a deprecated dependency.
Reply to this answer
Add your answer
Answers are reviewed before publication.
Related Discussions