-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move from next-auth to supabase-auth (On refactored code) #105
base: dev
Are you sure you want to change the base?
Conversation
Changes to be committed: modified: apps/unsaged/.env.local.example deleted: apps/unsaged/app/api/auth/[...nextauth]/route.ts new file: apps/unsaged/app/api/auth/route.ts modified: apps/unsaged/app/api/models/route.ts new file: apps/unsaged/app/auth/callback/route.ts new file: apps/unsaged/app/auth/signin/auth-form.tsx new file: apps/unsaged/app/auth/signin/page.tsx new file: apps/unsaged/app/auth/signout/route.ts modified: apps/unsaged/components/Home/components/PrimaryMenu/components/ActivityBar/ActivityBar.tsx modified: apps/unsaged/components/Home/components/SecondaryMenu/components/Menu/components/Screens/ModelSettings/components/model.tsx modified: apps/unsaged/db/GenerationScript.sql modified: apps/unsaged/middleware.ts modified: apps/unsaged/package.json deleted: apps/unsaged/types/auth-provider.ts deleted: apps/unsaged/types/next-auth.d.ts new file: apps/unsaged/types/supabase.types.ts modified: apps/unsaged/utils/app/auth/helpers.ts deleted: apps/unsaged/utils/app/auth/providers.ts modified: apps/unsaged/utils/app/const.ts modified: apps/unsaged/utils/app/storage/supabase/helpers/conversations.ts modified: apps/unsaged/utils/server/ai_vendors/openai/models.ts modified: pnpm-lock.yaml
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Ignored Deployment
|
@daniel-farina Just one quick thought:
This way we don´t need to add another configuration variable to unsaged. I honestly don´t see the point of the ability to disable AI vendors via ENV var, either you don´t define a Global API Key and/or Url settings or the user don´t define a key in the frontend so I think disabling the model lookup by the existence of the necessary configuration would be enough, what do you mean? |
I initially had the same thought, but then I realized that it's not foolproof. If someone merely uses a placeholder, they might not be aware that it's active, even if the key is incorrect. Therefore the app consistently attempt to fetch the models with wrong keys. but actually I'm ok with |
That's a point but I think everyone who is hosting undated themself will know that he has to put a valid key in it, for the user input we could implement a simple validation of a minimum length or something like that. I don't know maybe there is a regex for the validation of OpenAI API key? |
works with me! 👍 I'll change it before we merge. I'm still troubleshooting SSR and latest version of supabase. Checkout the last commit, it should be working now. I'm just troubleshooting prod buildon vercel. Prod build works on local env for now. |
This PR moves this project away from next-auth to supabase-auth. This makes the configuration a lot simpler.
Tasks:
Now the application works immediately once supabase is configured, you can login with magic links, no need to setup smtp providers.
Todo
The login by wildcard *@email feature has been removed, we might want to add that again