I am trying to build the Appwrite adapter for NextAuth.js which provides an easy setup to add authentication to NextJS, Svelte, etc. using different providers and adapters. The adapter connects the database with the front end and you don't have to write any query to create, update, delete, and read any user, session, or token. Adapters have methods defined to query the database.
I created the adapter and tested it locally in isolation and in integration with NextJS, everything worked as expected now I had to write the script which can create a database, create all the collections with attributes and indexes, and create relationships. So far so good but I got stuck at one point, in the test we cannot use credentials to create a project or use an existing project because it will be tested by many different members at NextAuth and they do not want to create an account and project just for testing this adapter. So they said, "We need a way to test it locally without any cloud provider requirement, like Firebase local emulator". As far as I know, even for using self-hosted Appwrite I will need to log in to create a project. Now is there any way we can override authentication? or any alternative
I hope my problem is clear, if not then please let me know. Thanks
Here is the PR you can follow https://github.com/nextauthjs/next-auth/pull/10000
Replied there
You mean like for example, to create the database, collection, etc you use the server SDK, you don't even want to use the token? Because if you use a token, and then give all permission to the collection you won't need authentication.
In your case, you want to avoid any authentication? (I don't know Fibrebase local emulator)
Read that but still, you need to log into the console running on your local to create a project.
We do need the token otherwise nothing works right. A kind of proxy I don't know π . A way that can let me use all the methods locally and since it is local maybe we can remove authentication to the console, right?
Just to understand, the appwrite instance will be run locally right? or do you pretend to integrate someting similar to CI/automation?
Yes it will run locally.
Is there a way I can set the project ID in the compose file?
What do you want to?
It's like trying to test a MariaDB database without installing it π€·ββοΈ
Not really, the only workaround I can think at this moment, is to expose the mariadb port and run a query, to create a token with the permissions so you can always use the same token, and it will have the permission you need to create the database and all the stuff you need
Apologise if my question was not clear. I know this is not how Appwrite works. I was hoping maybe we can just create a project locally without having to log in like we can do in supabase https://supabase.com/docs/guides/cli/getting-started?platform=linux anyways thanks for the help. I will try to figure a way out.
That might be helpful thanks
You're welcome, let me know if you get to work this, I think I understand why you need this
Recommended threads
- Type Mismatch in AppwriteException
There is a discrepancy in the TypeScript type definitions for AppwriteException. The response property is defined as a string in the type definitions, but in pr...
- [SOLVED] OAuth With Google & Flutter
Hi all, I'm trying to sign in with google and it all goes swimmingly until the call back. I get a new user created on the appwrite dashboard however the flutte...
- What Query's are valid for GetDocument?
Documentation shows that Queries are valid here, but doesn't explain which queries are valid. At first I presumed this to be a bug, but before creating a githu...