-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
feat: appwrite adapter #10000
base: main
Are you sure you want to change the base?
feat: appwrite adapter #10000
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Skipped Deployment
|
@sourabpramanik is attempting to deploy a commit to the authjs Team on Vercel. A member of the Team first needs to authorize it. |
Hey @sourabpramanik thanks for the contribution! Without having taken a closer look at the code, it seems like you've got a lot of the basics covered. As you mentioned in your todo list above, a testing setup is required. I'd encourage you to first take a look at our upcoming "creating a database adapter guidelines" and double check you've got everythign covered 🙏 Thanks! |
Yes, only thing that is left is to add the documentation to explain the structure of the database and the test script. The test works fine when you have the following:
I have tested this locally all the test cases were passing and created a NextJS project with NextAuth to use this Adapter with the GitHub provider and Email provider, there too this adapter works well. The logic is working fine just stuck at writing the test script for it to automate. |
Is there a local dev package for the appwrite maybe? Like the "firebase local emulator" in the case if firestore 🤔 Having a set of tests for which we need a cloud account is not something we can accept unfortunately |
No there's no other option I could find. But I am talking to the Appwrite team about this. Let's see. |
@ndom91 the Upstash Redis adapter has a test dependency on Redis URL and Key similar so if that can work then the Appwrite adapter can also work right. For appwrite we will need client Id, endpoint, and API secret. |
Hmm odd, i don't remember ever setting an upstash api key anywhere locally. They even reference a local-only alternative for testing / development in their docs (https://upstash.com/docs/oss/sdks/ts/redis/developing). Let us know if you find a solution 🙏 I'll talk to the other folks on the team about what they think in the mean time |
Sure I am working on it. Thankyou |
So we really want to avoid another cloud provider requirement for tests. The upstash one has been nothing but a pain in the butt, in fact i just refactored it out after i found the serverless-redis-http recommendation from them while researching this haha. See #10033 Anyway, we're totally happy to accept new adapters like this, but please no cloud requirements for testing 🙏 |
Yes it does make sense to automate such an extra process so that we can only focus on the parts we care about. I will raise a request about it in today's office hours and let's see if there's a way we can avoid using the cloud. If not then all the hard work will be for nothing at all 🥲 |
@ndom91 Appwrite contributor here. Is that enough for this case? Thanks! |
@sourabpramanik What command are you running? You shouldn't need to source anything really just run |
Yes using this command. Maybe try removing the volumes |
…to feat/appwrite-adapter
Hey @PineappleIOnic I am not having any luck. What should I do? |
@sourabpramanik Your in our discord server right? We can hop on a call if you like and we can debug it together on your machine. Shoot me a DM and I'll try and organize a time |
Thanks man but I fixed it by increasing the setTimeout duration from 1 sec to 5 sec. The database setup was still in progress while the server responded with 200 status. |
database functions are too slow and cause the tests to fail. Did you experience the lag? |
I've never really experienced it being slow on my end however if need be we could implement checks to make sure the schema has been correctly setup before tests run, something like "check if DB is full provisioned, if not wait 5 seconds and try again" and we loop for like 5 tries, wdyt? |
Worth a try. I will get back with the results |
@ndom91 Can you please review this again? @PineappleIOnic has improved the test setup process and updated the docs, so now everything should work as expected for you. Looking forward!! |
Could we get someone to approve the workflows and review this? |
hey guys! @ndom91 @ThangHuuVu @balazsorban44 @ubbe-xyz |
👍 |
Also need! |
Covered most of the cases and methods. Follow the to-do to know about the upcoming changes:
☕️ Reasoning
This PR is for adding the Appwrite adapter for auth.js and next-auth.js
🧢 Checklist
🎫 Affected issues
Feat #7709
📌 Resources