https://supabase.com/ logo
#help
Title
# help
s

Sealion

02/06/2022, 3:23 PM
What is the different between Auth and Auth (Server only?) If I am using for example sveltekit and using endpoints (call supabase from server, not frontend) should I focus on the documentation about server then?
s

Scott P

02/06/2022, 7:42 PM
The server only ones likely need the service key which you shouldn’t ever expose in a user-facing situation
s

Sealion

02/06/2022, 7:43 PM
Ok, but I dont get what the differences are?
s

Scott P

02/06/2022, 7:46 PM
Would you want a user being able to delete any user from the front end? For most projects, you wouldn’t want them to be able to do that. That’s one example of why some functions should only be called from a server
s

Sealion

02/06/2022, 7:48 PM
Okay. But what would the difference be between signup() and createUser()
is signup() executing createUser() on the server?
o

osaxma

02/06/2022, 8:28 PM
Different use cases. For example, if you've an admin panel where an admin can create account for "employees" (signup doesn't make sense here), you'd use the Server Only API on the Server Side of the Admin Panel.. Same applies for other functionalities where you need to manually do things.. The signup and co are meant for client side and used by client libraries which have different workflows.
not necessarily .. most likely each has its own implementation. You can create your own in SQL too if you want as long as you fill the tables in the auth schema properly.
s

Sealion

02/06/2022, 8:34 PM
Thank you for this. It's kind of what my conclusion came to be. 🙂