This tutorial demonstrates how to set up a supabase user sign up form in a web app. For this example we'll use Nuxt 3, however the workflow is similar with other frameworks and user login setups.
These are some general concepts that you'll need to make use of for connecting Supabase to an app; and more specifically, to set up user sign up
- these are secure keys that give you access to a service. They are commonly used to access data.
- find the environment variables in Supabase's settings
- add them to a
.env
file locally - set them up in your live deployment environment
- asynchronous functions return a promise that something will happen
- they are used when sending requests for data as the response isn't immediate
- async functions are commonly used when fetching from an api as well
- many services provide a library of tools that streamline accessing features
- in this case, you will be using the
nuxtjs/supabase
module - this module provides functions like
useSupabaseClient()
anduseSupabaseUser()
which make it really easy to work with the service - however sometimes, libraries can be out of date and break, it's important to take note of how stable the library is (and the environment that you're using it in)
These instructions present a pattern that can be followed for other functionalities like signIn, signOut or forgotten password. the functions from the library might be different but the structure of the code will be roughly the same.
you can pass an options: {// email redirect // user name in data}
to send redirects for when the user gets a confirmation as well as to set other values like user name (that would be done in:
options:{data:{user_name: username.value}}
)