
So, I am using 3rd party solution otpless
to onboard user. Now, the things is this 3rd party sol does not generate session token. So, I will be using this service to simply verify user but I generate session I want to use appwrite... So, any suggestion?


there response body, json
{
"statusCode": 200,
"data": {
"userMobile": "911234567890",
"userName": "OTPless",
"timestamp": "2023-03-24T11:28:38.148973Z"
},
"user": {
"waId": "test1234",
"waNumber": "911234567890",
"waName": "OTPless",
"timestamp": "2023-03-24T11:28:38.148798Z"
},
"success": true,
"ok": true,
"status": "SUCCESS"
}

Hi, first of all, if the userMobile
is confidential - please try removing it from your sample response body for the sake of privacy, second, let me look into the best way to do this but a suggestion might be to make a function that gets triggered when OTPless indicates a login and an account is created using createAccount for storing sessions - although that might be tough given there are no tokens in response you sent

ahh, no not it's random phone... btw again I will mask it

awesome! good to know

Can you send us some link to docs about server integration so we can check how it can integrate with Appwrite

actually, they seems be asking for business email, but I can do one things I can copy paste the state that they asked to follow...

I had used bitecope support email ( steps seems fairly simple) ... they prettry much support all the frontend sdks

they simply asked to call, this curl url....curl
curl --location --request POST 'https://companyName.authlink.me' \
--header 'clientId: test1234' \
--header 'clientSecret: test1234' \
--header 'Content-Type: application/json' \
--data-raw '{
"waId": "test1234"
}'

they mainly only 3 response status, 101, 200 & 500 only

on 200 this is the body

any suggestion or thoughts on this would be very helpful 🙂

but for now I have implemented the google OAuth

Honestly, the best thing to do would be to onboard this as one of our phone auth providers.
We actually had a PR for adding whatsapp auth via 360dialog: https://github.com/appwrite/appwrite/pull/4536

like jyoti said, you can't send headers or cookies back from functions so you can't really make a normal appwrite session...

mm yaa, agree... I guess no worries for now I was just wondering here and there for last couple of days figuring out which Auth to go and hwo ..have settled with Google Auth and I hope in future WhatsApp ( hopefully if possible in next release get added) and any way in meantime will try to figure out phone number provider

btw can like Otpless team also request for PR?

If so I will try to nudge them to support appwrite

in order to work with us, the provider would need to have an API to send a code that we generate. My concern is otpless doesn't allow that. it seems like they generate the OTP themselves?

mm not sure, but as per current so flow is like there buttons user clicks they launched WhatsApp, the user clicks on send button with fixed message template and send in response get link, when user clicks on link then user get redirected back to the App... The good part that i like is link is binded with devices so if user forward the link it gets expired...

anyway for now I guess we can consider this thread closed... I guess I will inform Otpless team if there is any possibility they can try to integrate appwrite somehow...

ya...probably not

it's almost ~1 AM here so will go sleep, from morning there would be quite few questions that i already have in mind to ask 😅😂
Recommended threads
- How to setup Appwrite in react native ?
Can someone explain me how can I setup Appwrite in my existing project. I don't want to clone this cause I've already project
- Issue with Appwrite Function Execution –...
Hi all, I'm encountering an issue when calling an Appwrite function from my Flutter app. **Environment:** ```Flutter SDK: 3.27.3 Appwrite Flutter SDK: 16.1.0```...
- "Index length is longer than the maximum...
In one my database, my attribute for `sid` seems to no more than 32 characters. I am not sure what 768 limit is here. Can't find it in the docs either. I need ...
