Authentication flow using CreateEmailToken() / CreateSession(): empty AccessToken and RefreshToken
- 0
- Self Hosted
- Auth
Hey all,
I am using the .NET SDK for Appwrite v1.7.4 and are working on an authentication / login flow. The process:
- User logs in with mail
- Backend calls Appwrite.CreateEmailToken()
- If ok notify user 3b: servers sents mail, possibly creates user
- User waits for mail to get his secret (OTP, 6 characters)
- Users enters secret
- Backend checks secret with Appwrite.CreateSession() and gets a session
My problem is the general flow ... is off. The session does not provide me with an AccessToken or RefreshToken. Meaning they are empty. It does contain some kind of secret. The earlier generated token also contains a secret I believe.
How do I retrieve the access and refresh tokens? Is the process working differently? Who is handling the token refresh? How long is the token valid? Do I authenticate the user "again" (after he comes back) with the secrets? How do I do that? How long are they valid? ...
Recommended threads
- Hosting Issues with Static IP not domain...
I have a machine with Static Public IP. I want to host Appwrite Site on it but I tried it but it doesn't allow IP addresses in Domain names. What should I do h...
- Email address must be in its canonical f...
Hello, Recently I was trying to signup with my GitHub account with appwrite account for availing the student benifits but while trying to signup I saw such erro...
- encrypt and decrypt buckets
I have a bucket where I switched from encryption to not encrypting files. I later realized that files already uploaded earlier stay encrypted. Now I have a buck...