jorge-menjivar / unsaged

Open source chat kit engineered for seamless interaction with AI models.

Home Page:https://unsaged.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Help Needed] Implement Dual Authentication Support for Supabase Auth and Clerk in Next.js

daniel-farina opened this issue · comments

Goal

The objective is to extend our authentication capabilities to include Clerk as an alternative to Suppabase. This integration should allow for seamless switching between the two services through environment variable configurations.

Requirements

  • Complete #91 first
  • Integrate Clerk alongside Suppabase in the authentication flow.
  • Ensure that the authentication helpers are adaptable for use with both Supabase Auth and Clerk.
  • The switch between Supabase Auth and Clerk should be manageable by setting the appropriate .env variables.
  • Document the changes comprehensively in a single feature branch PR.

Expected Outcome

A successful contribution will result in a flexible authentication setup where either Supabase Auth or Clerk can be used interchangeably based on simple environment variable toggles, without affecting the existing authentication functionality.

Contribution Process

  1. Express your interest by commenting on this issue to prevent overlapping work.
  2. Fork the repository, and create a feature branch for this task.
  3. Implement the integration while ensuring that both authentication systems can coexist and are selectable via .env variables.
  4. Thoroughly test the implementation to ensure that both systems work independently when chosen.
  5. Open a Pull Request with a detailed list of changes and testing procedures for review.

Additional Notes

  • The implementation should not break the current default authentication method.
  • Keep changes minimal and modular to facilitate easy review and potential rollback.
  • Ensure backward compatibility for existing users who might not switch to Clerk immediately.

This feature is critical for users who prefer Clerk or require its specific functionalities, and your contributions towards this dual authentication capability will significantly enhance the flexibility of our application.

Thank you for considering this contribution; we are excited to see your innovative solutions!

Not pursuing for now