Creating an Appwrite Adapter #7709
Labels
enhancement
New feature or request
triage
Unseen or unconfirmed by a maintainer yet. Provide extra information in the meantime.
Description 📓
An adapter for appwrite that would basically allow users to interact with appwrite's database.
Here is the documentation for interacting with appwrite's database using its SDK:
https://appwrite.io/docs/client/databases?sdk=web-default#databases
Here is a basic example of an ansynchronous getUser function that can be implemented:
async getUser(sessionToken) {
return 💚
}
Reference on creating a custom adapter for Nextauthjs :
https://next-auth.js.org/adapters/overview#custom-adapter
How to reproduce ☕️
Purpose of the feature is to allow interaction of user data from/to appwrite database. Basically the features of an adapter.
Here are some key features and methods typically found in an adapter for NextAuth.js:
For example:
getUser(id: string): Retrieves a user from the database based on the provided user ID.
getUserByEmail(email: string): Retrieves a user from the database based on the provided email address.
createUser(user: Omit<AdapterUser, "id">): Creates a new user in the database with the provided user data.
updateUser(user: AdapterUser): Updates an existing user in the database with the provided user data.
deleteUser(id: string): Deletes a user from the database based on the provided user ID.
Refer to the docs for more info.
Contributing 🙌🏽
Yes, I am willing to help implement this feature in a PR
The text was updated successfully, but these errors were encountered: