JavaScript: Create an anonymous user
Creates a new anonymous user.
- Returns an anonymous user
- It is recommended to set up captcha for anonymous sign-ins to prevent abuse. You can pass in the captcha token in the
options
param.
Parameters
Examples
Create an anonymous user
const \{ data, error \} = await supabase.auth.signInAnonymously(\{
options: \{
captchaToken
\}
\});
Create an anonymous user with custom user metadata
const \{ data, error \} = await supabase.auth.signInAnonymously(\{
options: \{
data
\}
\})