[B4X] Supabase - The Open Source Firebase alternative
Supabase is an open source Firebase alternative. It provides all the backend services you need to build a product. Supabase uses Postgres database with real-time capabilities. Basically, supabase provides an interface to manage postgres database that you can use to create table and insert, edit...
www.b4x.com
Supabase now supports anonymous user login, the B4X library now too.
Supabase Auth now supports Anonymous Sign-ins
Sign in as an anonymous user to authenticate with Supabase
supabase.com
Create and use anonymous users to authenticate with Supabase
Enable Anonymous Sign-Ins to build apps which provide users an authenticated experience without requiring users to enter an email address, password, use an OAuth provider or provide any other PII (Personally Identifiable Information). Later, when ready, the user can link an authentication method to their account.
Anonymous sign-ins can be used to build:
- E-commerce applications, such as shopping carts before check-out
- Full-feature demos without collecting personal information
- Temporary or throw-away accounts
Anonymous users use the authenticated role. To distinguish between anonymous users and permanent users, your policies need to check the is_anonymous field of the user's JWT.
See the Access control section for more details.
Abuse prevention and rate limits
Since anonymous users are stored in your database, bad actors can abuse the endpoint to increase your database size drastically. It is strongly recommended to enable invisible Captcha or Cloudflare Turnstile to prevent abuse for anonymous sign-ins. An IP-based rate limit is enforced at 30 requests per hour which can be modified in your dashboard. You can refer to the full list of rate limits here.
More you can read in the official blog post:
Anonymous Sign-Ins | Supabase Docs
Create and use anonymous users to authenticate with Supabase
supabase.com
B4X:
Wait For (xSupabase.Auth.LogIn_Anonymously) Complete (AnonymousUser As SupabaseUser)
If AnonymousUser.Error.Success Then
Log("Successfully created an anonymous user")
Else
Log("Error: " & AnonymousUser.Error.ErrorMessage)
End If