Skip to content
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

Creating an Appwrite Adapter #7709

Open
Adarsreg opened this issue Jun 1, 2023 · 1 comment
Open

Creating an Appwrite Adapter #7709

Adarsreg opened this issue Jun 1, 2023 · 1 comment
Labels
enhancement New feature or request triage Unseen or unconfirmed by a maintainer yet. Provide extra information in the meantime.

Comments

@Adarsreg
Copy link

Adarsreg commented Jun 1, 2023

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

@Adarsreg Adarsreg added enhancement New feature or request triage Unseen or unconfirmed by a maintainer yet. Provide extra information in the meantime. labels Jun 1, 2023
@Chaitanya-Upadhye
Copy link

Hey, I'd also be glad to contribute to implement this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request triage Unseen or unconfirmed by a maintainer yet. Provide extra information in the meantime.
Projects
None yet
Development

No branches or pull requests

2 participants