Back

[SOLVED] Is it possible to create a team membership without using the email?

  • 0
  • Web
anyuru
5 Sep, 2023, 11:59

I am using the phone number authentication and I would like the member to join a team before immediately after registering. However, the email is a required parameter and as my users are registering they do not provide an email. My intention for using teams is to achieve authorisation in order to control access to the resources that the users interact with in my databases both at document and collection levels. Any help or guidance through this is more than welcome. Thanks

TL;DR
Is it possible to create a team membership without using email? The order of the arguments needs to be specified according to the documentation. The redirect URL only works for localhost. The solution was to pass some parameters as undefined. Users can join a team after registering using phone number authentication.
Drake
5 Sep, 2023, 19:14

What version of Appwrite are you on?

anyuru
5 Sep, 2023, 21:42

I figured it out.

Drake
5 Sep, 2023, 21:55

what was the solution?

anyuru
5 Sep, 2023, 22:09

I just had to pass some of the parameters as undefined

anyuru
5 Sep, 2023, 22:09

Something like that. Though it was had figuring out the positions in which to pass the arguments.

anyuru
5 Sep, 2023, 22:11

And the redirect url was only working for localhost. I tried the other domains it was suggesting but nothing was working out fine. So I decided to go with local host. Otherwise I would have utilized the vercel domain

anyuru
5 Sep, 2023, 22:12

Something like my-project.vercel.app

anyuru
5 Sep, 2023, 22:13

I think the order needs to be specified in the documentation.

anyuru
5 Sep, 2023, 22:13

In which arguments are passed

anyuru
5 Sep, 2023, 22:13

While calling the team membership api

Drake
5 Sep, 2023, 22:30

what version of appwrite are you on and what version of the web SDK?

anyuru
5 Sep, 2023, 22:35

1.3.7

Drake
5 Sep, 2023, 22:37
Drake
5 Sep, 2023, 22:38

also, you can mouse over the createMembership function in your code to see the function signature

Drake
5 Sep, 2023, 22:38

[SOLVED] Is it possible to create a team membership without using the email?

anyuru
6 Sep, 2023, 07:27

Thanks

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