Back

[CLOSED] Store country code

  • 0
  • Accounts
  • Web
Ajit Singh
3 Nov, 2023, 08:14

How can I store country code while logging in with phone. It is a problem because many people may not put the OTP and not login. So what is the best place so that I can store country code and phone as two different fields

TL;DR
The user wants to store country codes for users in their store. They are unsure of where to store it since the country code is only available during login. The suggested solution is to create a collection with all country codes and give read permissions to all roles. They can then call on this collection during login to store the country code.
Guille
3 Nov, 2023, 12:01

I'm sorry, I don't understand well your problem. You want to store country code and phone as two fields, but what do you want to do with the fields?

Ajit Singh
3 Nov, 2023, 12:05

I want to show country code in my UI so I need to store it but I only get it on login time when the user is not logged in so how can I store it

Guille
3 Nov, 2023, 12:25

Oh, you can create a collection with all country code, give permissions to read by all Role.any() or Role.guests() and then call it on login

ideclon
3 Nov, 2023, 15:59

If they’re not completing signup, why do you need to store their user details? Just put it in the DB when they complete signup

Drake
5 Nov, 2023, 21:28

Some more insight into why you need to store the country code would be helpful.

Or can this be closed?

Ajit Singh
6 Nov, 2023, 10:30

We can close this

Guille
7 Nov, 2023, 19:44

[CLOSED] Store country code

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more