mirror of
https://github.com/supabase/supabase.git
synced 2026-10-05 09:25:06 +03:00
[bot] fix lint errors (#32869)
Co-authored-by: github-docs-bot <github-docs-bot@supabase.com>
This commit is contained in:
1 parent
4bd7e9e64f
commit
f2ae79e887
2 files changed
+12
-12
No files matched your search
+10
-10
@@ -10,13 +10,13 @@ database_id = "031ba6d7-4928-4d95-a2da-bff8dbb740ec"
|
||||
http_status_code = 500
|
||||
---
|
||||
|
||||
# Resolving 500 Status Authentication Errors
|
||||
# Resolving 500 status authentication errors
|
||||
|
||||
A 500 error in Auth typically indicates an issue with an external dependency, such as your database or SMTP provider, rather than with Auth itself. This guide will help you explore the Auth logs to identify the underlying cause.
|
||||
|
||||
### Prerequisites
|
||||
|
||||
#### Open the Log Explorer
|
||||
#### Open the log explorer
|
||||
|
||||
Ensure you have access to the [Dashboard's Log Explorer](https://supabase.com/dashboard/project/_/logs/explorer) and set the time range appropriately:
|
||||
|
||||
@@ -32,9 +32,9 @@ Logs are displayed in a table format, which can be challenging to read. Double-c
|
||||
src="https://github.com/user-attachments/assets/6f4c833c-ae15-41e1-9aa8-48ebd58741a1"
|
||||
/>
|
||||
|
||||
## Section 1: Checking for Database-Level Errors
|
||||
## Section 1: Checking for database-level errors
|
||||
|
||||
### Query for Recent Database Errors
|
||||
### Query for recent database errors
|
||||
|
||||
Use the following SQL query to check for any recent errors the Auth server encountered while interacting with your database:
|
||||
|
||||
@@ -62,11 +62,11 @@ limit 100;
|
||||
|
||||
If no results are returned, proceed to Section 2.
|
||||
|
||||
### Common Database-Level Errors
|
||||
### Common database-level errors
|
||||
|
||||
There are few known categories of auth/database level errors:
|
||||
|
||||
### Constraint Related (sql_state_code = 23503 or 23\*)
|
||||
### Constraint related (sql_state_code = 23503 or 23\*)
|
||||
|
||||
If you’ve manually created a foreign key relationship between your tables and those in the `auth` schema, a constraint may prevent the Auth server from updating the `auth.users` table.
|
||||
|
||||
@@ -139,13 +139,13 @@ The trigger may be referencing a table or column that no longer exists. In that
|
||||
- remove the trigger
|
||||
- recreate the database object that the trigger referenced
|
||||
|
||||
### Corrupted Schema
|
||||
### Corrupted schema
|
||||
|
||||
If you made any customizations to the auth schema, such as adding RLS, modifying table columns, or adding/dropping tables, it can break migrations done by the Auth Server. It's necessary to remove these changes and restore the auth schema to its original form.
|
||||
|
||||
## Section 2: Checking Auth level errors
|
||||
|
||||
### Query for Auth Errors
|
||||
### Query for Auth errors
|
||||
|
||||
Run this SQL query in the Log Explorer to find Auth-related errors:
|
||||
|
||||
@@ -167,7 +167,7 @@ where
|
||||
order by timestamp
|
||||
```
|
||||
|
||||
### Database Migration Errors
|
||||
### Database migration errors
|
||||
|
||||
> "running db migrations: Migrator: problem creating schema migrations"
|
||||
|
||||
@@ -186,7 +186,7 @@ The logs may contain messages about `gomail`. It means that auth is struggling t
|
||||
|
||||
The log will be able to provide some context for what is occurring, but it is important to check with your external SMTP provider to make sure everything is properly configured.
|
||||
|
||||
## Step 3: Checking Email Templates
|
||||
## Step 3: Checking email templates
|
||||
|
||||
Incomplete or incorrect email templates can also cause 500 errors. If your templates have unclosed variable tags or HTML elements, or use forbidden characters, this might be the issue.
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ database_id = "46bab0a2-9780-4e4f-99f5-fcc9fa51c496"
|
||||
|
||||
We want to clarify and provide reassurance on this topic.
|
||||
|
||||
### Security Overview:
|
||||
### Security overview:
|
||||
|
||||
Enabling anonymous sign-ins on your project does not reduce its security. Here's why:
|
||||
|
||||
@@ -17,7 +17,7 @@ Enabling anonymous sign-ins on your project does not reduce its security. Here's
|
||||
- Security Policies: All role-based security policies (RLS) applicable to regular users also apply to anonymous users.
|
||||
- Identity Verification Measures: Even though anonymous users do not initially provide an email or phone number, the security of your project remains robust. But to prevent misuse, we recommend implementing additional security measure such as [CAPTCHA](https://supabase.com/docs/guides/auth/auth-captcha): to ensure that interactions are genuinely human.
|
||||
|
||||
### Practical Use Cases:
|
||||
### Practical use cases:
|
||||
|
||||
- Demo Mode: You can enable users to try out your product in a demo mode without full account creation.
|
||||
- Feature Restrictions: You can limit certain actions (like posting public content) to users who sign up with more identifiable information (e.g., Google or Apple sign-ins), while still allowing anonymous users to explore your app.
|
||||
|
||||
Reference in new issue
Block a user