Hello
I have a MERN application. Currently using auth in the backend sending jwt to React frontend.
Each api call in express server validates the jwt before sending response.
Can i replace entire auth with appwrite?
/register and /login should be replaced by appwrite. Means when /register calls from frontend backend should use appwrite. When /login calls by react app backend express should check user in appwrite and create the jwt and should send to frontend.
Is this possible?
It wont depend on the route, After you hit the route, Write a controller which calls the server SDK of appwrite.
this is the intro for server sdk
https://appwrite.io/docs/server/users This is the section you need to study to implement authentication.
Accounts: https://appwrite.io/docs/server/account
You just need to create a controller for register and login route and write the appwrite logic to perform CRUD operations on USER, there are may features such as Verifying the emmail
, Password Recovery
in Account
module of Appwrite.
Yes I'll go through this
Previously i got for Registration logic
Login method was not found in Server sdk That was in client sdk
For create user we send email and password
Similar method is not there to login i guess
Yes bht createSession method is in another sdk right?
Aren't you using Account ?
Are you using Users
?
Create an account using Users and login the user using Account
. It will be fine
User server sdk in account also.
Recommended threads
- Query Appwrite
Hello, I have a question regarding Queries in Appwrite. If I have a string "YYYY-MM", how can I query the $createdAt column to match this filter?
- Different appwrite IDs are getting expos...
File_URL_FORMAT= https://cloud.appwrite.io/v1/storage/buckets/[BUCKET_ID]/files/[FILE_ID]/preview?project=[PROJECT_ID] I'm trying to access files in my web app...
- Invalid document structure: missing requ...
I just pick up my code that's working a week ago, and now I got this error: ``` code: 400, type: 'document_invalid_structure', response: { message: 'Inv...