Fix: New User Login Error Resolved in v1.0.423
Fix: New User Login Error Resolved in v1.0.423
Release: v1.0.423
Type: Bug Fix
Severity: High
What Happened
Following a recent database schema change, newly registered users were unable to access the platform after logging in. Immediately after sign-in, users were presented with the following error:
Failed query: altered table hmrc_tokens; enable row-level security plan rams
This error originated from the hmrc_tokens table — the database table responsible for storing each user's HMRC OAuth credentials securely.
Root Cause
When the hmrc_tokens table was altered as part of a prior schema update, Row-Level Security (RLS) was not enabled on the table and no RLS policies were put in place.
Row-Level Security is a PostgreSQL feature that ensures users can only access rows in a database table that belong to them. Without it, the query planner rejected access attempts for newly created user records, causing the login flow to fail with the error above.
What Was Fixed
In v1.0.423:
- RLS has been enabled on the
hmrc_tokenstable. - Appropriate access policies have been applied so that each authenticated user can read and write only their own HMRC token records.
- The login flow for new users now completes successfully.
Who Was Affected
| User Type | Affected? |
|---|---|
| New users (post-registration login) | ✅ Yes — blocked from accessing the platform |
| Existing logged-in users | ❌ No — existing sessions were unaffected |
| Existing users logging back in | ❌ No — tokens already present were unaffected |
Action Required
No action is required from users. The fix has been deployed automatically. If you previously encountered this error during sign-up, please try logging in again — your account is intact and you should now be able to access the platform normally.
If you continue to experience issues, please contact support.
Released as part of the standard deployment cycle. No user data was lost as a result of this issue.