'Scan error on column confirmation_token: converting NULL to string is unsupported' during Auth login
如果你在认证时遇到带有消息 error finding user: sql: Scan error on column "confirmation_token": converting NULL to string is unsupported 的 HTTP 500 错误,这通常意味着 GoTrue Auth 服务在 auth.users.confirmation_token 列中发现了一个 NULL 值,而该列本应该是非空字符串。
🌐 If you encounter an HTTP 500 error during authentication with the message error finding user: sql: Scan error on column "confirmation_token": converting NULL to string is unsupported, this typically indicates that the GoTrue Auth service found a NULL value in the auth.users.confirmation_token column, where a non-nullable string is expected.
要解决这个问题,在 NULL 的地方将 confirmation_token 更新为空字符串。你可以在 SQL 编辑器 中执行以下 SQL 查询:
🌐 To resolve this, update the confirmation_token to an empty string where it is NULL. You can execute the following SQL query in the SQL Editor:
1update auth.users set confirmation_token = '' where confirmation_token is null;