Rank 2: Process
Do the fetch using the rest api and pass it to vuejs?
Votes
0
Replies
24
Participants
Unknown
Messages
25
Rank 2: Process
Do the fetch using the rest api and pass it to vuejs?
create some sort of sign in API in adonis that accepts the email and password. On the adonis side, use fetch to make an API call to Appwrite
Rank 2: Process
I didn't find the endpoint to create a session through the rest api.
Rank 2: Process
createEmailSession does not exist in the rest api
you can switch Platform to REST for all of our API docs
i just linked you to it
Rank 2: Process
Perfect. Then, after logging in, move the session to vue so that all other requests can be met.
Rank 2: Process
I will try. Thank you very much for your attention.
btw we plan on improving this in the near future so you can do this with the SDK
Rank 2: Process
We made a request via rest api, but no token is shown in the response.
Rank 2: Process
{
"$id": "65558e577fgfgdee0281",
"$createdAt": "2023-11-16T03:36:55.503+00:00",
"userId": "65558d21ddfgdg50b137a",
"expire": "2024-11-15T03:36:55.497+00:00",
"provider": "email",
"providerUid": "test@gmail.com",
"providerAccessToken": "",
"providerAccessTokenExpiry": "",
"providerRefreshToken": "",
"ip": "154.387.155.141",
"osCode": "",
"osName": "",
"osVersion": "",
"clientType": "library",
"clientCode": "",
"clientName": "Insomnia REST Client",
"clientVersion": "2023.5",
"clientEngine": "",
"clientEngineVersion": "",
"deviceName": "",
"deviceBrand": "",
"deviceModel": "",
"countryCode": "br",
"countryName": "Brazil",
"current": true
}
Correct...the session is a cookie so it's in the header
Rank 2: Process
thank you
Rank 2: Process
We will have to change all sdk requests to rest api.
In our scenario.
Not necessarily. I think you should be able to set the header using client.setHeader()
Rank 2: Process
in sdk node there is no client.setHeader()
Rank 2: Process
Sorry how about addHeader()?
Rank 2: Process
Hello Steven, we are unable to use addHeader()
Rank 2: Process
Looks like it's missing from the types declaration, but it should still exist on the object
Rank 2: Process
yes. it's missing from the types declaration
Rank 2: Process
it's work
import Client from 'node-appwrite/lib/client.js'