[GH-ISSUE #8348] Schema generation removes magic link verifications & Magic link sign-in still broken in 1.5.2 #28387

Closed
opened 2026-04-17 19:50:05 -05:00 by GiteaMirror · 0 comments
Owner

Originally created by @mthwJsmith on GitHub (Mar 3, 2026).
Original GitHub issue: https://github.com/better-auth/better-auth/issues/8348

Originally assigned to: @himself65 on GitHub.

Is this suited for github?

  • Yes, this is suited for github

To Reproduce

The fix in v1.5.2 (PR #8247) is incomplete, it addressed the id-based to identifier-based operations, but the Model "verification" not found in schema error persists

The root cause is in @better-auth/core's getAuthTables() at get-tables.mjs:259:

...!options.secondaryStorage || options.verification?.storeInDatabase ?
  verificationTable : {}

When secondaryStorage is configured and verification.storeInDatabase is not explicitly set, the verification model is excluded from the internal schema entirely.

The internal adapter's code paths (hooks, create, find) still reference "verification" as a model name, which causes the adapter factory's getDefaultModelName("verification") to throw since the model doesn't exist in the schema.

My workaround is to add verification { storeInDatabase: true } to my Better Auth config. This keeps the model in the schema and stores verifications in both KV and DB

Current vs. Expected behavior

I expect the verifications table not to be removed.
I expect magic sign-in's to continue working.

What version of Better Auth are you using?

1.5.2

System info

{
  "system": {
    "platform": "darwin",
    "arch": "arm64",
    "version": "Darwin Kernel Version 25.3.0: Wed Jan 28 20:48:41 PST 2026; root:xnu-12377.81.4~5/RELEASE_ARM64_T6041",
    "release": "25.3.0",
    "cpuCount": 16,
    "cpuModel": "Apple M4 Max",
    "totalMemory": "128.00 GB",
    "freeMemory": "68.45 GB"
  },
  "node": {
    "version": "v24.14.0",
    "env": "development"
  },
  "packageManager": {
    "name": "bun",
    "version": "1.3.10"
  },
  "frameworks": [
    {
      "name": "next",
      "version": "^16.1.6"
    },
    {
      "name": "react",
      "version": "^19.2.4"
    }
  ],
  "databases": [
    {
      "name": "pg",
      "version": "^8.19.0"
    },
    {
      "name": "postgres",
      "version": "^3.4.8"
    },
    {
      "name": "drizzle",
      "version": "^0.45.1"
    }
  ],
  "betterAuth": {
    "version": "^1.5.0",
    "config": {
      "appName": "[REDACTED]",
      "baseURL": "http://localhost:3000",
      "secret": "[REDACTED]",
      "secondaryStorage": {},
      "rateLimit": {
        "storage": "secondary-storage"
      },
      "session": {
        "cookieCache": {
          "enabled": true,
          "maxAge": 300
        }
      },
      "user": {
        "additionalFields": {
          "firstName": {
            "type": "string",
            "required": true
          },
          "lastName": {
            "type": "string",
            "required": true
          },
          "creatorProfileId": {
            "type": "string",
            "required": false,
            "input": false,
            "unique": true
          }
        },
        "changeEmail": {
          "enabled": true
        }
      },
      "account": {
        "accountLinking": {
          "enabled": true,
          "allowDifferentEmails": true,
          "allowUnlinkingAll": true
        }
      },
      "socialProviders": {
        "google": {
          "clientId": "[REDACTED]",
          "clientSecret": "[REDACTED]"
        }
      },
      "hooks": {},
      "databaseHooks": {
        "session": {
          "update": {},
          "create": {}
        },
        "user": {
          "create": {},
          "update": {}
        }
      },
      "plugins": [
        {
          "name": "magic-link",
          "config": {
            "id": "magic-link",
            "endpoints": {},
            "rateLimit": [
              {
                "window": 60,
                "max": 5
              }
            ],
            "options": {}
          }
        },
        {
          "name": "organization",
          "config": {
            "id": "organization",
            "endpoints": {},
            "schema": {
              "organization": {
                "fields": {
                  "name": {
                    "type": "string",
                    "required": true,
                    "sortable": true
                  },
                  "slug": {
                    "type": "string",
                    "required": true,
                    "unique": true,
                    "sortable": true,
                    "index": true
                  },
                  "logo": {
                    "type": "string",
                    "required": false
                  },
                  "createdAt": {
                    "type": "date",
                    "required": true
                  },
                  "metadata": {
                    "type": "string",
                    "required": false
                  },
                  "url": {
                    "type": "string",
                    "required": false,
                    "input": true
                  }
                }
              },
              "member": {
                "modelName": "orgMember",
                "fields": {
                  "organizationId": {
                    "type": "string",
                    "required": true,
                    "references": {
                      "model": "organization",
                      "field": "id"
                    },
                    "index": true
                  },
                  "userId": {
                    "type": "string",
                    "required": true,
                    "references": {
                      "model": "user",
                      "field": "id"
                    },
                    "index": true
                  },
                  "role": {
                    "type": "string",
                    "required": true,
                    "sortable": true,
                    "defaultValue": "member"
                  },
                  "createdAt": {
                    "type": "date",
                    "required": true
                  }
                }
              },
              "invitation": {
                "modelName": "orgInvitation",
                "fields": {
                  "organizationId": {
                    "type": "string",
                    "required": true,
                    "references": {
                      "model": "organization",
                      "field": "id"
                    },
                    "index": true
                  },
                  "email": {
                    "type": "string",
                    "required": true,
                    "sortable": true,
                    "index": true
                  },
                  "role": {
                    "type": "string",
                    "required": false,
                    "sortable": true
                  },
                  "status": {
                    "type": "string",
                    "required": true,
                    "sortable": true,
                    "defaultValue": "pending"
                  },
                  "expiresAt": {
                    "type": "date",
                    "required": true
                  },
                  "createdAt": {
                    "type": "date",
                    "required": true
                  },
                  "inviterId": {
                    "type": "string",
                    "references": {
                      "model": "user",
                      "field": "id"
                    },
                    "required": true
                  }
                }
              },
              "session": {
                "fields": {
                  "activeOrganizationId": {
                    "type": "string",
                    "required": false
                  }
                }
              }
            },
            "$Infer": {
              "Organization": {},
              "Invitation": {},
              "Member": {},
              "Team": {},
              "TeamMember": {},
              "ActiveOrganization": {}
            },
            "$ERROR_CODES": {
              "YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_ORGANIZATION": {
                "code": "YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_ORGANIZATION",
                "message": "You are not allowed to create a new organization"
              },
              "YOU_HAVE_REACHED_THE_MAXIMUM_NUMBER_OF_ORGANIZATIONS": {
                "code": "YOU_HAVE_REACHED_THE_MAXIMUM_NUMBER_OF_ORGANIZATIONS",
                "message": "You have reached the maximum number of organizations"
              },
              "ORGANIZATION_ALREADY_EXISTS": {
                "code": "ORGANIZATION_ALREADY_EXISTS",
                "message": "Organization already exists"
              },
              "ORGANIZATION_SLUG_ALREADY_TAKEN": {
                "code": "ORGANIZATION_SLUG_ALREADY_TAKEN",
                "message": "Organization slug already taken"
              },
              "ORGANIZATION_NOT_FOUND": {
                "code": "ORGANIZATION_NOT_FOUND",
                "message": "Organization not found"
              },
              "USER_IS_NOT_A_MEMBER_OF_THE_ORGANIZATION": {
                "code": "USER_IS_NOT_A_MEMBER_OF_THE_ORGANIZATION",
                "message": "User is not a member of the organization"
              },
              "YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_ORGANIZATION": {
                "code": "YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_ORGANIZATION",
                "message": "You are not allowed to update this organization"
              },
              "YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_ORGANIZATION": {
                "code": "YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_ORGANIZATION",
                "message": "You are not allowed to delete this organization"
              },
              "NO_ACTIVE_ORGANIZATION": {
                "code": "NO_ACTIVE_ORGANIZATION",
                "message": "No active organization"
              },
              "USER_IS_ALREADY_A_MEMBER_OF_THIS_ORGANIZATION": {
                "code": "USER_IS_ALREADY_A_MEMBER_OF_THIS_ORGANIZATION",
                "message": "User is already a member of this organization"
              },
              "MEMBER_NOT_FOUND": {
                "code": "MEMBER_NOT_FOUND",
                "message": "Member not found"
              },
              "ROLE_NOT_FOUND": {
                "code": "ROLE_NOT_FOUND",
                "message": "Role not found"
              },
              "YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_TEAM": {
                "code": "YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_TEAM",
                "message": "You are not allowed to create a new team"
              },
              "TEAM_ALREADY_EXISTS": {
                "code": "TEAM_ALREADY_EXISTS",
                "message": "Team already exists"
              },
              "TEAM_NOT_FOUND": {
                "code": "TEAM_NOT_FOUND",
                "message": "Team not found"
              },
              "YOU_CANNOT_LEAVE_THE_ORGANIZATION_AS_THE_ONLY_OWNER": {
                "code": "YOU_CANNOT_LEAVE_THE_ORGANIZATION_AS_THE_ONLY_OWNER",
                "message": "You cannot leave the organization as the only owner"
              },
              "YOU_CANNOT_LEAVE_THE_ORGANIZATION_WITHOUT_AN_OWNER": {
                "code": "YOU_CANNOT_LEAVE_THE_ORGANIZATION_WITHOUT_AN_OWNER",
                "message": "You cannot leave the organization without an owner"
              },
              "YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_MEMBER": {
                "code": "YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_MEMBER",
                "message": "You are not allowed to delete this member"
              },
              "YOU_ARE_NOT_ALLOWED_TO_INVITE_USERS_TO_THIS_ORGANIZATION": {
                "code": "YOU_ARE_NOT_ALLOWED_TO_INVITE_USERS_TO_THIS_ORGANIZATION",
                "message": "You are not allowed to invite users to this organization"
              },
              "USER_IS_ALREADY_INVITED_TO_THIS_ORGANIZATION": {
                "code": "USER_IS_ALREADY_INVITED_TO_THIS_ORGANIZATION",
                "message": "User is already invited to this organization"
              },
              "INVITATION_NOT_FOUND": {
                "code": "INVITATION_NOT_FOUND",
                "message": "Invitation not found"
              },
              "YOU_ARE_NOT_THE_RECIPIENT_OF_THE_INVITATION": {
                "code": "YOU_ARE_NOT_THE_RECIPIENT_OF_THE_INVITATION",
                "message": "You are not the recipient of the invitation"
              },
              "EMAIL_VERIFICATION_REQUIRED_BEFORE_ACCEPTING_OR_REJECTING_INVITATION": {
                "code": "EMAIL_VERIFICATION_REQUIRED_BEFORE_ACCEPTING_OR_REJECTING_INVITATION",
                "message": "Email verification required before accepting or rejecting invitation"
              },
              "YOU_ARE_NOT_ALLOWED_TO_CANCEL_THIS_INVITATION": {
                "code": "YOU_ARE_NOT_ALLOWED_TO_CANCEL_THIS_INVITATION",
                "message": "You are not allowed to cancel this invitation"
              },
              "INVITER_IS_NO_LONGER_A_MEMBER_OF_THE_ORGANIZATION": {
                "code": "INVITER_IS_NO_LONGER_A_MEMBER_OF_THE_ORGANIZATION",
                "message": "Inviter is no longer a member of the organization"
              },
              "YOU_ARE_NOT_ALLOWED_TO_INVITE_USER_WITH_THIS_ROLE": {
                "code": "YOU_ARE_NOT_ALLOWED_TO_INVITE_USER_WITH_THIS_ROLE",
                "message": "You are not allowed to invite a user with this role"
              },
              "FAILED_TO_RETRIEVE_INVITATION": {
                "code": "FAILED_TO_RETRIEVE_INVITATION",
                "message": "Failed to retrieve invitation"
              },
              "YOU_HAVE_REACHED_THE_MAXIMUM_NUMBER_OF_TEAMS": {
                "code": "YOU_HAVE_REACHED_THE_MAXIMUM_NUMBER_OF_TEAMS",
                "message": "You have reached the maximum number of teams"
              },
              "UNABLE_TO_REMOVE_LAST_TEAM": {
                "code": "UNABLE_TO_REMOVE_LAST_TEAM",
                "message": "Unable to remove last team"
              },
              "YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_MEMBER": {
                "code": "YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_MEMBER",
                "message": "You are not allowed to update this member"
              },
              "ORGANIZATION_MEMBERSHIP_LIMIT_REACHED": {
                "code": "ORGANIZATION_MEMBERSHIP_LIMIT_REACHED",
                "message": "Organization membership limit reached"
              },
              "YOU_ARE_NOT_ALLOWED_TO_CREATE_TEAMS_IN_THIS_ORGANIZATION": {
                "code": "YOU_ARE_NOT_ALLOWED_TO_CREATE_TEAMS_IN_THIS_ORGANIZATION",
                "message": "You are not allowed to create teams in this organization"
              },
              "YOU_ARE_NOT_ALLOWED_TO_DELETE_TEAMS_IN_THIS_ORGANIZATION": {
                "code": "YOU_ARE_NOT_ALLOWED_TO_DELETE_TEAMS_IN_THIS_ORGANIZATION",
                "message": "You are not allowed to delete teams in this organization"
              },
              "YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_TEAM": {
                "code": "YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_TEAM",
                "message": "You are not allowed to update this team"
              },
              "YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_TEAM": {
                "code": "YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_TEAM",
                "message": "You are not allowed to delete this team"
              },
              "INVITATION_LIMIT_REACHED": {
                "code": "INVITATION_LIMIT_REACHED",
                "message": "Invitation limit reached"
              },
              "TEAM_MEMBER_LIMIT_REACHED": {
                "code": "TEAM_MEMBER_LIMIT_REACHED",
                "message": "Team member limit reached"
              },
              "USER_IS_NOT_A_MEMBER_OF_THE_TEAM": {
                "code": "USER_IS_NOT_A_MEMBER_OF_THE_TEAM",
                "message": "User is not a member of the team"
              },
              "YOU_CAN_NOT_ACCESS_THE_MEMBERS_OF_THIS_TEAM": {
                "code": "YOU_CAN_NOT_ACCESS_THE_MEMBERS_OF_THIS_TEAM",
                "message": "You are not allowed to list the members of this team"
              },
              "YOU_DO_NOT_HAVE_AN_ACTIVE_TEAM": {
                "code": "YOU_DO_NOT_HAVE_AN_ACTIVE_TEAM",
                "message": "You do not have an active team"
              },
              "YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_TEAM_MEMBER": {
                "code": "YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_TEAM_MEMBER",
                "message": "You are not allowed to create a new member"
              },
              "YOU_ARE_NOT_ALLOWED_TO_REMOVE_A_TEAM_MEMBER": {
                "code": "YOU_ARE_NOT_ALLOWED_TO_REMOVE_A_TEAM_MEMBER",
                "message": "You are not allowed to remove a team member"
              },
              "YOU_ARE_NOT_ALLOWED_TO_ACCESS_THIS_ORGANIZATION": {
                "code": "YOU_ARE_NOT_ALLOWED_TO_ACCESS_THIS_ORGANIZATION",
                "message": "You are not allowed to access this organization as an owner"
              },
              "YOU_ARE_NOT_A_MEMBER_OF_THIS_ORGANIZATION": {
                "code": "YOU_ARE_NOT_A_MEMBER_OF_THIS_ORGANIZATION",
                "message": "You are not a member of this organization"
              },
              "MISSING_AC_INSTANCE": {
                "code": "MISSING_AC_INSTANCE",
                "message": "Dynamic Access Control requires a pre-defined ac instance on the server auth plugin. Read server logs for more information"
              },
              "YOU_MUST_BE_IN_AN_ORGANIZATION_TO_CREATE_A_ROLE": {
                "code": "YOU_MUST_BE_IN_AN_ORGANIZATION_TO_CREATE_A_ROLE",
                "message": "You must be in an organization to create a role"
              },
              "YOU_ARE_NOT_ALLOWED_TO_CREATE_A_ROLE": {
                "code": "YOU_ARE_NOT_ALLOWED_TO_CREATE_A_ROLE",
                "message": "You are not allowed to create a role"
              },
              "YOU_ARE_NOT_ALLOWED_TO_UPDATE_A_ROLE": {
                "code": "YOU_ARE_NOT_ALLOWED_TO_UPDATE_A_ROLE",
                "message": "You are not allowed to update a role"
              },
              "YOU_ARE_NOT_ALLOWED_TO_DELETE_A_ROLE": {
                "code": "YOU_ARE_NOT_ALLOWED_TO_DELETE_A_ROLE",
                "message": "You are not allowed to delete a role"
              },
              "YOU_ARE_NOT_ALLOWED_TO_READ_A_ROLE": {
                "code": "YOU_ARE_NOT_ALLOWED_TO_READ_A_ROLE",
                "message": "You are not allowed to read a role"
              },
              "YOU_ARE_NOT_ALLOWED_TO_LIST_A_ROLE": {
                "code": "YOU_ARE_NOT_ALLOWED_TO_LIST_A_ROLE",
                "message": "You are not allowed to list a role"
              },
              "YOU_ARE_NOT_ALLOWED_TO_GET_A_ROLE": {
                "code": "YOU_ARE_NOT_ALLOWED_TO_GET_A_ROLE",
                "message": "You are not allowed to get a role"
              },
              "TOO_MANY_ROLES": {
                "code": "TOO_MANY_ROLES",
                "message": "This organization has too many roles"
              },
              "INVALID_RESOURCE": {
                "code": "INVALID_RESOURCE",
                "message": "The provided permission includes an invalid resource"
              },
              "ROLE_NAME_IS_ALREADY_TAKEN": {
                "code": "ROLE_NAME_IS_ALREADY_TAKEN",
                "message": "That role name is already taken"
              },
              "CANNOT_DELETE_A_PRE_DEFINED_ROLE": {
                "code": "CANNOT_DELETE_A_PRE_DEFINED_ROLE",
                "message": "Cannot delete a pre-defined role"
              },
              "ROLE_IS_ASSIGNED_TO_MEMBERS": {
                "code": "ROLE_IS_ASSIGNED_TO_MEMBERS",
                "message": "Cannot delete a role that is assigned to members. Please reassign the members to a different role first"
              }
            },
            "options": {
              "ac": {
                "statements": {
                  "organization": [
                    "update",
                    "delete"
                  ],
                  "member": [
                    "create",
                    "update",
                    "delete"
                  ],
                  "invitation": [
                    "create",
                    "cancel"
                  ],
                  "team": [
                    "create",
                    "update",
                    "delete"
                  ],
                  "ac": [
                    "create",
                    "read",
                    "update",
                    "delete"
                  ]
                }
              },
              "roles": {
                "owner": {
                  "statements": {
                    "organization": [
                      "update",
                      "delete"
                    ],
                    "member": [
                      "create",
                      "update",
                      "delete"
                    ],
                    "invitation": [
                      "create",
                      "cancel"
                    ],
                    "team": [
                      "create",
                      "update",
                      "delete"
                    ],
                    "ac": [
                      "create",
                      "read",
                      "update",
                      "delete"
                    ]
                  }
                },
                "admin": {
                  "statements": {
                    "organization": [
                      "update"
                    ],
                    "invitation": [
                      "create",
                      "cancel"
                    ],
                    "member": [
                      "create",
                      "update",
                      "delete"
                    ],
                    "team": [
                      "create",
                      "update",
                      "delete"
                    ],
                    "ac": [
                      "create",
                      "read",
                      "update",
                      "delete"
                    ]
                  }
                },
                "member": {
                  "statements": {
                    "organization": [],
                    "member": [],
                    "invitation": [],
                    "team": [],
                    "ac": [
                      "read"
                    ]
                  }
                },
                "viewer": {
                  "statements": {
                    "organization": [],
                    "member": [],
                    "invitation": [],
                    "team": []
                  }
                },
                "creator": {
                  "statements": {
                    "organization": [],
                    "member": [],
                    "invitation": [],
                    "team": []
                  }
                }
              },
              "invitationExpiresIn": 604800,
              "cancelPendingInvitationsOnReInvite": true,
              "membershipLimit": 9007199254740991,
              "schema": {
                "invitation": {
                  "modelName": "orgInvitation"
                },
                "member": {
                  "modelName": "orgMember"
                },
                "organization": {
                  "additionalFields": {
                    "url": {
                      "type": "string",
                      "required": false,
                      "input": true
                    }
                  }
                }
              },
              "organizationHooks": {}
            }
          }
        },
        {
          "name": "admin",
          "config": {
            "id": "admin",
            "hooks": {
              "after": [
                {}
              ]
            },
            "endpoints": {},
            "$ERROR_CODES": {
              "FAILED_TO_CREATE_USER": {
                "code": "FAILED_TO_CREATE_USER",
                "message": "Failed to create user"
              },
              "USER_ALREADY_EXISTS": {
                "code": "USER_ALREADY_EXISTS",
                "message": "User already exists."
              },
              "USER_ALREADY_EXISTS_USE_ANOTHER_EMAIL": {
                "code": "USER_ALREADY_EXISTS_USE_ANOTHER_EMAIL",
                "message": "User already exists. Use another email."
              },
              "YOU_CANNOT_BAN_YOURSELF": {
                "code": "YOU_CANNOT_BAN_YOURSELF",
                "message": "You cannot ban yourself"
              },
              "YOU_ARE_NOT_ALLOWED_TO_CHANGE_USERS_ROLE": {
                "code": "YOU_ARE_NOT_ALLOWED_TO_CHANGE_USERS_ROLE",
                "message": "You are not allowed to change users role"
              },
              "YOU_ARE_NOT_ALLOWED_TO_CREATE_USERS": {
                "code": "YOU_ARE_NOT_ALLOWED_TO_CREATE_USERS",
                "message": "You are not allowed to create users"
              },
              "YOU_ARE_NOT_ALLOWED_TO_LIST_USERS": {
                "code": "YOU_ARE_NOT_ALLOWED_TO_LIST_USERS",
                "message": "You are not allowed to list users"
              },
              "YOU_ARE_NOT_ALLOWED_TO_LIST_USERS_SESSIONS": {
                "code": "YOU_ARE_NOT_ALLOWED_TO_LIST_USERS_SESSIONS",
                "message": "You are not allowed to list users sessions"
              },
              "YOU_ARE_NOT_ALLOWED_TO_BAN_USERS": {
                "code": "YOU_ARE_NOT_ALLOWED_TO_BAN_USERS",
                "message": "You are not allowed to ban users"
              },
              "YOU_ARE_NOT_ALLOWED_TO_IMPERSONATE_USERS": {
                "code": "YOU_ARE_NOT_ALLOWED_TO_IMPERSONATE_USERS",
                "message": "You are not allowed to impersonate users"
              },
              "YOU_ARE_NOT_ALLOWED_TO_REVOKE_USERS_SESSIONS": {
                "code": "YOU_ARE_NOT_ALLOWED_TO_REVOKE_USERS_SESSIONS",
                "message": "You are not allowed to revoke users sessions"
              },
              "YOU_ARE_NOT_ALLOWED_TO_DELETE_USERS": {
                "code": "YOU_ARE_NOT_ALLOWED_TO_DELETE_USERS",
                "message": "You are not allowed to delete users"
              },
              "YOU_ARE_NOT_ALLOWED_TO_SET_USERS_PASSWORD": {
                "code": "YOU_ARE_NOT_ALLOWED_TO_SET_USERS_PASSWORD",
                "message": "You are not allowed to set users password"
              },
              "BANNED_USER": {
                "code": "BANNED_USER",
                "message": "You have been banned from this application"
              },
              "YOU_ARE_NOT_ALLOWED_TO_GET_USER": {
                "code": "YOU_ARE_NOT_ALLOWED_TO_GET_USER",
                "message": "You are not allowed to get user"
              },
              "NO_DATA_TO_UPDATE": {
                "code": "NO_DATA_TO_UPDATE",
                "message": "No data to update"
              },
              "YOU_ARE_NOT_ALLOWED_TO_UPDATE_USERS": {
                "code": "YOU_ARE_NOT_ALLOWED_TO_UPDATE_USERS",
                "message": "You are not allowed to update users"
              },
              "YOU_CANNOT_REMOVE_YOURSELF": {
                "code": "YOU_CANNOT_REMOVE_YOURSELF",
                "message": "You cannot remove yourself"
              },
              "YOU_ARE_NOT_ALLOWED_TO_SET_NON_EXISTENT_VALUE": {
                "code": "YOU_ARE_NOT_ALLOWED_TO_SET_NON_EXISTENT_VALUE",
                "message": "You are not allowed to set a non-existent role value"
              },
              "YOU_CANNOT_IMPERSONATE_ADMINS": {
                "code": "YOU_CANNOT_IMPERSONATE_ADMINS",
                "message": "You cannot impersonate admins"
              },
              "INVALID_ROLE_TYPE": {
                "code": "INVALID_ROLE_TYPE",
                "message": "Invalid role type"
              }
            },
            "schema": {
              "user": {
                "fields": {
                  "role": {
                    "type": "string",
                    "required": false,
                    "input": false
                  },
                  "banned": {
                    "type": "boolean",
                    "defaultValue": false,
                    "required": false,
                    "input": false
                  },
                  "banReason": {
                    "type": "string",
                    "required": false,
                    "input": false
                  },
                  "banExpires": {
                    "type": "date",
                    "required": false,
                    "input": false
                  }
                }
              },
              "session": {
                "fields": {
                  "impersonatedBy": {
                    "type": "string",
                    "required": false
                  }
                }
              }
            },
            "options": {
              "adminUserIds": [
                "user_TpCXtDU74dCr",
                "user_oopmG2v7mgRG",
                "user_zX1CZ1MqaHXq"
              ],
              "impersonationSessionDuration": 3600
            }
          }
        },
        {
          "name": "mcp",
          "config": {
            "id": "mcp",
            "hooks": {
              "after": [
                {}
              ]
            },
            "endpoints": {},
            "schema": {
              "oauthApplication": {
                "modelName": "oauthApplication",
                "fields": {
                  "name": {
                    "type": "string"
                  },
                  "icon": {
                    "type": "string",
                    "required": false
                  },
                  "metadata": {
                    "type": "string",
                    "required": false
                  },
                  "clientId": {
                    "type": "string",
                    "unique": true
                  },
                  "clientSecret": {
                    "type": "string",
                    "required": false
                  },
                  "redirectUrls": {
                    "type": "string"
                  },
                  "type": {
                    "type": "string"
                  },
                  "disabled": {
                    "type": "boolean",
                    "required": false,
                    "defaultValue": false
                  },
                  "userId": {
                    "type": "string",
                    "required": false,
                    "references": {
                      "model": "user",
                      "field": "id",
                      "onDelete": "cascade"
                    },
                    "index": true
                  },
                  "createdAt": {
                    "type": "date"
                  },
                  "updatedAt": {
                    "type": "date"
                  }
                }
              },
              "oauthAccessToken": {
                "modelName": "oauthAccessToken",
                "fields": {
                  "accessToken": {
                    "type": "string",
                    "unique": true
                  },
                  "refreshToken": {
                    "type": "string",
                    "unique": true
                  },
                  "accessTokenExpiresAt": {
                    "type": "date"
                  },
                  "refreshTokenExpiresAt": {
                    "type": "date"
                  },
                  "clientId": {
                    "type": "string",
                    "references": {
                      "model": "oauthApplication",
                      "field": "clientId",
                      "onDelete": "cascade"
                    },
                    "index": true
                  },
                  "userId": {
                    "type": "string",
                    "required": false,
                    "references": {
                      "model": "user",
                      "field": "id",
                      "onDelete": "cascade"
                    },
                    "index": true
                  },
                  "scopes": {
                    "type": "string"
                  },
                  "createdAt": {
                    "type": "date"
                  },
                  "updatedAt": {
                    "type": "date"
                  }
                }
              },
              "oauthConsent": {
                "modelName": "oauthConsent",
                "fields": {
                  "clientId": {
                    "type": "string",
                    "references": {
                      "model": "oauthApplication",
                      "field": "clientId",
                      "onDelete": "cascade"
                    },
                    "index": true
                  },
                  "userId": {
                    "type": "string",
                    "references": {
                      "model": "user",
                      "field": "id",
                      "onDelete": "cascade"
                    },
                    "index": true
                  },
                  "scopes": {
                    "type": "string"
                  },
                  "createdAt": {
                    "type": "date"
                  },
                  "updatedAt": {
                    "type": "date"
                  },
                  "consentGiven": {
                    "type": "boolean"
                  }
                }
              }
            },
            "options": {
              "loginPage": "/auth/sign-up",
              "oidcConfig": {
                "loginPage": "/auth/sign-up"
              }
            }
          }
        },
        {
          "name": "api-key",
          "config": {
            "id": "api-key",
            "$ERROR_CODES": {
              "INVALID_METADATA_TYPE": {
                "code": "INVALID_METADATA_TYPE",
                "message": "metadata must be an object or undefined"
              },
              "REFILL_AMOUNT_AND_INTERVAL_REQUIRED": {
                "code": "REFILL_AMOUNT_AND_INTERVAL_REQUIRED",
                "message": "refillAmount is required when refillInterval is provided"
              },
              "REFILL_INTERVAL_AND_AMOUNT_REQUIRED": {
                "code": "REFILL_INTERVAL_AND_AMOUNT_REQUIRED",
                "message": "refillInterval is required when refillAmount is provided"
              },
              "USER_BANNED": {
                "code": "USER_BANNED",
                "message": "User is banned"
              },
              "UNAUTHORIZED_SESSION": {
                "code": "UNAUTHORIZED_SESSION",
                "message": "Unauthorized or invalid session"
              },
              "KEY_NOT_FOUND": {
                "code": "KEY_NOT_FOUND",
                "message": "API Key not found"
              },
              "KEY_DISABLED": {
                "code": "KEY_DISABLED",
                "message": "API Key is disabled"
              },
              "KEY_EXPIRED": {
                "code": "KEY_EXPIRED",
                "message": "API Key has expired"
              },
              "USAGE_EXCEEDED": {
                "code": "USAGE_EXCEEDED",
                "message": "API Key has reached its usage limit"
              },
              "KEY_NOT_RECOVERABLE": {
                "code": "KEY_NOT_RECOVERABLE",
                "message": "API Key is not recoverable"
              },
              "EXPIRES_IN_IS_TOO_SMALL": {
                "code": "EXPIRES_IN_IS_TOO_SMALL",
                "message": "The expiresIn is smaller than the predefined minimum value."
              },
              "EXPIRES_IN_IS_TOO_LARGE": {
                "code": "EXPIRES_IN_IS_TOO_LARGE",
                "message": "The expiresIn is larger than the predefined maximum value."
              },
              "INVALID_REMAINING": {
                "code": "INVALID_REMAINING",
                "message": "The remaining count is either too large or too small."
              },
              "INVALID_PREFIX_LENGTH": {
                "code": "INVALID_PREFIX_LENGTH",
                "message": "The prefix length is either too large or too small."
              },
              "INVALID_NAME_LENGTH": {
                "code": "INVALID_NAME_LENGTH",
                "message": "The name length is either too large or too small."
              },
              "METADATA_DISABLED": {
                "code": "METADATA_DISABLED",
                "message": "Metadata is disabled."
              },
              "RATE_LIMIT_EXCEEDED": {
                "code": "RATE_LIMIT_EXCEEDED",
                "message": "Rate limit exceeded."
              },
              "NO_VALUES_TO_UPDATE": {
                "code": "NO_VALUES_TO_UPDATE",
                "message": "No values to update."
              },
              "KEY_DISABLED_EXPIRATION": {
                "code": "KEY_DISABLED_EXPIRATION",
                "message": "Custom key expiration values are disabled."
              },
              "INVALID_API_KEY": {
                "code": "INVALID_API_KEY",
                "message": "Invalid API key."
              },
              "INVALID_USER_ID_FROM_API_KEY": {
                "code": "INVALID_USER_ID_FROM_API_KEY",
                "message": "The user id from the API key is invalid."
              },
              "INVALID_REFERENCE_ID_FROM_API_KEY": {
                "code": "INVALID_REFERENCE_ID_FROM_API_KEY",
                "message": "The reference id from the API key is invalid."
              },
              "INVALID_API_KEY_GETTER_RETURN_TYPE": {
                "code": "INVALID_API_KEY_GETTER_RETURN_TYPE",
                "message": "API Key getter returned an invalid key type. Expected string."
              },
              "SERVER_ONLY_PROPERTY": {
                "code": "SERVER_ONLY_PROPERTY",
                "message": "The property you're trying to set can only be set from the server auth instance only."
              },
              "FAILED_TO_UPDATE_API_KEY": {
                "code": "FAILED_TO_UPDATE_API_KEY",
                "message": "Failed to update API key"
              },
              "NAME_REQUIRED": {
                "code": "NAME_REQUIRED",
                "message": "API Key name is required."
              },
              "ORGANIZATION_ID_REQUIRED": {
                "code": "ORGANIZATION_ID_REQUIRED",
                "message": "Organization ID is required for organization-owned API keys."
              },
              "USER_NOT_MEMBER_OF_ORGANIZATION": {
                "code": "USER_NOT_MEMBER_OF_ORGANIZATION",
                "message": "You are not a member of the organization that owns this API key."
              },
              "INSUFFICIENT_API_KEY_PERMISSIONS": {
                "code": "INSUFFICIENT_API_KEY_PERMISSIONS",
                "message": "You do not have permission to perform this action on organization API keys."
              },
              "NO_DEFAULT_API_KEY_CONFIGURATION_FOUND": {
                "code": "NO_DEFAULT_API_KEY_CONFIGURATION_FOUND",
                "message": "No default api-key configuration found."
              },
              "ORGANIZATION_PLUGIN_REQUIRED": {
                "code": "ORGANIZATION_PLUGIN_REQUIRED",
                "message": "Organization plugin is required for organization-owned API keys. Please install and configure the organization plugin."
              }
            },
            "hooks": {
              "before": [
                {}
              ]
            },
            "endpoints": {},
            "schema": {
              "apikey": {
                "fields": {
                  "configId": {
                    "type": "string",
                    "required": true,
                    "defaultValue": "default",
                    "input": false,
                    "index": true
                  },
                  "name": {
                    "type": "string",
                    "required": false,
                    "input": false
                  },
                  "start": {
                    "type": "string",
                    "required": false,
                    "input": false
                  },
                  "referenceId": {
                    "type": "string",
                    "required": true,
                    "input": false,
                    "index": true
                  },
                  "prefix": {
                    "type": "string",
                    "required": false,
                    "input": false
                  },
                  "key": {
                    "type": "string",
                    "required": true,
                    "input": false,
                    "index": true
                  },
                  "refillInterval": {
                    "type": "number",
                    "required": false,
                    "input": false
                  },
                  "refillAmount": {
                    "type": "number",
                    "required": false,
                    "input": false
                  },
                  "lastRefillAt": {
                    "type": "date",
                    "required": false,
                    "input": false
                  },
                  "enabled": {
                    "type": "boolean",
                    "required": false,
                    "input": false,
                    "defaultValue": true
                  },
                  "rateLimitEnabled": {
                    "type": "boolean",
                    "required": false,
                    "input": false,
                    "defaultValue": true
                  },
                  "rateLimitTimeWindow": {
                    "type": "number",
                    "required": false,
                    "input": false,
                    "defaultValue": 86400000
                  },
                  "rateLimitMax": {
                    "type": "number",
                    "required": false,
                    "input": false,
                    "defaultValue": 10
                  },
                  "requestCount": {
                    "type": "number",
                    "required": false,
                    "input": false,
                    "defaultValue": 0
                  },
                  "remaining": {
                    "type": "number",
                    "required": false,
                    "input": false
                  },
                  "lastRequest": {
                    "type": "date",
                    "required": false,
                    "input": false
                  },
                  "expiresAt": {
                    "type": "date",
                    "required": false,
                    "input": false
                  },
                  "createdAt": {
                    "type": "date",
                    "required": true,
                    "input": false
                  },
                  "updatedAt": {
                    "type": "date",
                    "required": true,
                    "input": false
                  },
                  "permissions": {
                    "type": "string",
                    "required": false,
                    "input": false
                  },
                  "metadata": {
                    "type": "string",
                    "required": false,
                    "input": true,
                    "transform": {}
                  }
                }
              }
            },
            "configurations": [
              {
                "apiKeyHeaders": [
                  "x-api-key"
                ],
                "enableMetadata": true,
                "enableSessionForAPIKeys": true,
                "defaultKeyLength": 64,
                "maximumPrefixLength": 32,
                "minimumPrefixLength": 1,
                "maximumNameLength": 32,
                "minimumNameLength": 1,
                "disableKeyHashing": false,
                "requireName": false,
                "storage": "database",
                "rateLimit": {
                  "enabled": true,
                  "timeWindow": 86400000,
                  "maxRequests": 10
                },
                "keyExpiration": {
                  "defaultExpiresIn": null,
                  "disableCustomExpiresTime": false,
                  "maxExpiresIn": 365,
                  "minExpiresIn": 1
                },
                "startingCharactersConfig": {
                  "shouldStore": true,
                  "charactersLength": 6
                },
                "fallbackToDatabase": false,
                "deferUpdates": false
              }
            ]
          }
        },
        {
          "name": "next-cookies",
          "config": {
            "id": "next-cookies",
            "hooks": {
              "before": [
                {}
              ],
              "after": [
                {}
              ]
            }
          }
        },
        {
          "name": "passkey",
          "config": {
            "id": "passkey",
            "endpoints": {},
            "schema": {
              "passkey": {
                "fields": {
                  "name": {
                    "type": "string",
                    "required": false
                  },
                  "publicKey": {
                    "type": "string",
                    "required": true
                  },
                  "userId": {
                    "type": "string",
                    "references": {
                      "model": "user",
                      "field": "id"
                    },
                    "required": true,
                    "index": true
                  },
                  "credentialID": {
                    "type": "string",
                    "required": true,
                    "index": true
                  },
                  "counter": {
                    "type": "number",
                    "required": true
                  },
                  "deviceType": {
                    "type": "string",
                    "required": true
                  },
                  "backedUp": {
                    "type": "boolean",
                    "required": true
                  },
                  "transports": {
                    "type": "string",
                    "required": false
                  },
                  "createdAt": {
                    "type": "date",
                    "required": false
                  },
                  "aaguid": {
                    "type": "string",
                    "required": false
                  }
                }
              }
            },
            "$ERROR_CODES": {
              "CHALLENGE_NOT_FOUND": {
                "code": "CHALLENGE_NOT_FOUND",
                "message": "Challenge not found"
              },
              "YOU_ARE_NOT_ALLOWED_TO_REGISTER_THIS_PASSKEY": {
                "code": "YOU_ARE_NOT_ALLOWED_TO_REGISTER_THIS_PASSKEY",
                "message": "You are not allowed to register this passkey"
              },
              "FAILED_TO_VERIFY_REGISTRATION": {
                "code": "FAILED_TO_VERIFY_REGISTRATION",
                "message": "Failed to verify registration"
              },
              "PASSKEY_NOT_FOUND": {
                "code": "PASSKEY_NOT_FOUND",
                "message": "Passkey not found"
              },
              "AUTHENTICATION_FAILED": {
                "code": "AUTHENTICATION_FAILED",
                "message": "Authentication failed"
              },
              "UNABLE_TO_CREATE_SESSION": {
                "code": "UNABLE_TO_CREATE_SESSION",
                "message": "Unable to create session"
              },
              "FAILED_TO_UPDATE_PASSKEY": {
                "code": "FAILED_TO_UPDATE_PASSKEY",
                "message": "Failed to update passkey"
              }
            },
            "options": {
              "rpName": "[REDACTED]",
              "rpID": "localhost"
            }
          }
        }
      ],
      "advanced": {
        "database": {}
      },
      "experimental": {
        "joins": true
      }
    }
  }
}

Which area(s) are affected? (Select all that apply)

Backend

Auth config (if applicable)

import { betterAuth } from "better-auth"
export const auth = betterAuth({
  // …
  database: drizzleAdapter(db, {
    provider: "pg",
    usePlural: true,
    schema
  }),
  // …
});

Additional context

No response

Originally created by @mthwJsmith on GitHub (Mar 3, 2026). Original GitHub issue: https://github.com/better-auth/better-auth/issues/8348 Originally assigned to: @himself65 on GitHub. ### Is this suited for github? - [x] Yes, this is suited for github ### To Reproduce The fix in v1.5.2 (PR #8247) is incomplete, it addressed the id-based to identifier-based operations, but the Model "verification" not found in schema error persists The root cause is in @better-auth/core's getAuthTables() at get-tables.mjs:259: ``` ...!options.secondaryStorage || options.verification?.storeInDatabase ? verificationTable : {} ``` When secondaryStorage is configured and verification.storeInDatabase is not explicitly set, the verification model is excluded from the internal schema entirely. The internal adapter's code paths (hooks, create, find) still reference "verification" as a model name, which causes the adapter factory's getDefaultModelName("verification") to throw since the model doesn't exist in the schema. My workaround is to add verification { storeInDatabase: true } to my Better Auth config. This keeps the model in the schema and stores verifications in both KV and DB ### Current vs. Expected behavior I expect the verifications table not to be removed. I expect magic sign-in's to continue working. ### What version of Better Auth are you using? 1.5.2 ### System info ```bash { "system": { "platform": "darwin", "arch": "arm64", "version": "Darwin Kernel Version 25.3.0: Wed Jan 28 20:48:41 PST 2026; root:xnu-12377.81.4~5/RELEASE_ARM64_T6041", "release": "25.3.0", "cpuCount": 16, "cpuModel": "Apple M4 Max", "totalMemory": "128.00 GB", "freeMemory": "68.45 GB" }, "node": { "version": "v24.14.0", "env": "development" }, "packageManager": { "name": "bun", "version": "1.3.10" }, "frameworks": [ { "name": "next", "version": "^16.1.6" }, { "name": "react", "version": "^19.2.4" } ], "databases": [ { "name": "pg", "version": "^8.19.0" }, { "name": "postgres", "version": "^3.4.8" }, { "name": "drizzle", "version": "^0.45.1" } ], "betterAuth": { "version": "^1.5.0", "config": { "appName": "[REDACTED]", "baseURL": "http://localhost:3000", "secret": "[REDACTED]", "secondaryStorage": {}, "rateLimit": { "storage": "secondary-storage" }, "session": { "cookieCache": { "enabled": true, "maxAge": 300 } }, "user": { "additionalFields": { "firstName": { "type": "string", "required": true }, "lastName": { "type": "string", "required": true }, "creatorProfileId": { "type": "string", "required": false, "input": false, "unique": true } }, "changeEmail": { "enabled": true } }, "account": { "accountLinking": { "enabled": true, "allowDifferentEmails": true, "allowUnlinkingAll": true } }, "socialProviders": { "google": { "clientId": "[REDACTED]", "clientSecret": "[REDACTED]" } }, "hooks": {}, "databaseHooks": { "session": { "update": {}, "create": {} }, "user": { "create": {}, "update": {} } }, "plugins": [ { "name": "magic-link", "config": { "id": "magic-link", "endpoints": {}, "rateLimit": [ { "window": 60, "max": 5 } ], "options": {} } }, { "name": "organization", "config": { "id": "organization", "endpoints": {}, "schema": { "organization": { "fields": { "name": { "type": "string", "required": true, "sortable": true }, "slug": { "type": "string", "required": true, "unique": true, "sortable": true, "index": true }, "logo": { "type": "string", "required": false }, "createdAt": { "type": "date", "required": true }, "metadata": { "type": "string", "required": false }, "url": { "type": "string", "required": false, "input": true } } }, "member": { "modelName": "orgMember", "fields": { "organizationId": { "type": "string", "required": true, "references": { "model": "organization", "field": "id" }, "index": true }, "userId": { "type": "string", "required": true, "references": { "model": "user", "field": "id" }, "index": true }, "role": { "type": "string", "required": true, "sortable": true, "defaultValue": "member" }, "createdAt": { "type": "date", "required": true } } }, "invitation": { "modelName": "orgInvitation", "fields": { "organizationId": { "type": "string", "required": true, "references": { "model": "organization", "field": "id" }, "index": true }, "email": { "type": "string", "required": true, "sortable": true, "index": true }, "role": { "type": "string", "required": false, "sortable": true }, "status": { "type": "string", "required": true, "sortable": true, "defaultValue": "pending" }, "expiresAt": { "type": "date", "required": true }, "createdAt": { "type": "date", "required": true }, "inviterId": { "type": "string", "references": { "model": "user", "field": "id" }, "required": true } } }, "session": { "fields": { "activeOrganizationId": { "type": "string", "required": false } } } }, "$Infer": { "Organization": {}, "Invitation": {}, "Member": {}, "Team": {}, "TeamMember": {}, "ActiveOrganization": {} }, "$ERROR_CODES": { "YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_ORGANIZATION": { "code": "YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_ORGANIZATION", "message": "You are not allowed to create a new organization" }, "YOU_HAVE_REACHED_THE_MAXIMUM_NUMBER_OF_ORGANIZATIONS": { "code": "YOU_HAVE_REACHED_THE_MAXIMUM_NUMBER_OF_ORGANIZATIONS", "message": "You have reached the maximum number of organizations" }, "ORGANIZATION_ALREADY_EXISTS": { "code": "ORGANIZATION_ALREADY_EXISTS", "message": "Organization already exists" }, "ORGANIZATION_SLUG_ALREADY_TAKEN": { "code": "ORGANIZATION_SLUG_ALREADY_TAKEN", "message": "Organization slug already taken" }, "ORGANIZATION_NOT_FOUND": { "code": "ORGANIZATION_NOT_FOUND", "message": "Organization not found" }, "USER_IS_NOT_A_MEMBER_OF_THE_ORGANIZATION": { "code": "USER_IS_NOT_A_MEMBER_OF_THE_ORGANIZATION", "message": "User is not a member of the organization" }, "YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_ORGANIZATION": { "code": "YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_ORGANIZATION", "message": "You are not allowed to update this organization" }, "YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_ORGANIZATION": { "code": "YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_ORGANIZATION", "message": "You are not allowed to delete this organization" }, "NO_ACTIVE_ORGANIZATION": { "code": "NO_ACTIVE_ORGANIZATION", "message": "No active organization" }, "USER_IS_ALREADY_A_MEMBER_OF_THIS_ORGANIZATION": { "code": "USER_IS_ALREADY_A_MEMBER_OF_THIS_ORGANIZATION", "message": "User is already a member of this organization" }, "MEMBER_NOT_FOUND": { "code": "MEMBER_NOT_FOUND", "message": "Member not found" }, "ROLE_NOT_FOUND": { "code": "ROLE_NOT_FOUND", "message": "Role not found" }, "YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_TEAM": { "code": "YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_TEAM", "message": "You are not allowed to create a new team" }, "TEAM_ALREADY_EXISTS": { "code": "TEAM_ALREADY_EXISTS", "message": "Team already exists" }, "TEAM_NOT_FOUND": { "code": "TEAM_NOT_FOUND", "message": "Team not found" }, "YOU_CANNOT_LEAVE_THE_ORGANIZATION_AS_THE_ONLY_OWNER": { "code": "YOU_CANNOT_LEAVE_THE_ORGANIZATION_AS_THE_ONLY_OWNER", "message": "You cannot leave the organization as the only owner" }, "YOU_CANNOT_LEAVE_THE_ORGANIZATION_WITHOUT_AN_OWNER": { "code": "YOU_CANNOT_LEAVE_THE_ORGANIZATION_WITHOUT_AN_OWNER", "message": "You cannot leave the organization without an owner" }, "YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_MEMBER": { "code": "YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_MEMBER", "message": "You are not allowed to delete this member" }, "YOU_ARE_NOT_ALLOWED_TO_INVITE_USERS_TO_THIS_ORGANIZATION": { "code": "YOU_ARE_NOT_ALLOWED_TO_INVITE_USERS_TO_THIS_ORGANIZATION", "message": "You are not allowed to invite users to this organization" }, "USER_IS_ALREADY_INVITED_TO_THIS_ORGANIZATION": { "code": "USER_IS_ALREADY_INVITED_TO_THIS_ORGANIZATION", "message": "User is already invited to this organization" }, "INVITATION_NOT_FOUND": { "code": "INVITATION_NOT_FOUND", "message": "Invitation not found" }, "YOU_ARE_NOT_THE_RECIPIENT_OF_THE_INVITATION": { "code": "YOU_ARE_NOT_THE_RECIPIENT_OF_THE_INVITATION", "message": "You are not the recipient of the invitation" }, "EMAIL_VERIFICATION_REQUIRED_BEFORE_ACCEPTING_OR_REJECTING_INVITATION": { "code": "EMAIL_VERIFICATION_REQUIRED_BEFORE_ACCEPTING_OR_REJECTING_INVITATION", "message": "Email verification required before accepting or rejecting invitation" }, "YOU_ARE_NOT_ALLOWED_TO_CANCEL_THIS_INVITATION": { "code": "YOU_ARE_NOT_ALLOWED_TO_CANCEL_THIS_INVITATION", "message": "You are not allowed to cancel this invitation" }, "INVITER_IS_NO_LONGER_A_MEMBER_OF_THE_ORGANIZATION": { "code": "INVITER_IS_NO_LONGER_A_MEMBER_OF_THE_ORGANIZATION", "message": "Inviter is no longer a member of the organization" }, "YOU_ARE_NOT_ALLOWED_TO_INVITE_USER_WITH_THIS_ROLE": { "code": "YOU_ARE_NOT_ALLOWED_TO_INVITE_USER_WITH_THIS_ROLE", "message": "You are not allowed to invite a user with this role" }, "FAILED_TO_RETRIEVE_INVITATION": { "code": "FAILED_TO_RETRIEVE_INVITATION", "message": "Failed to retrieve invitation" }, "YOU_HAVE_REACHED_THE_MAXIMUM_NUMBER_OF_TEAMS": { "code": "YOU_HAVE_REACHED_THE_MAXIMUM_NUMBER_OF_TEAMS", "message": "You have reached the maximum number of teams" }, "UNABLE_TO_REMOVE_LAST_TEAM": { "code": "UNABLE_TO_REMOVE_LAST_TEAM", "message": "Unable to remove last team" }, "YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_MEMBER": { "code": "YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_MEMBER", "message": "You are not allowed to update this member" }, "ORGANIZATION_MEMBERSHIP_LIMIT_REACHED": { "code": "ORGANIZATION_MEMBERSHIP_LIMIT_REACHED", "message": "Organization membership limit reached" }, "YOU_ARE_NOT_ALLOWED_TO_CREATE_TEAMS_IN_THIS_ORGANIZATION": { "code": "YOU_ARE_NOT_ALLOWED_TO_CREATE_TEAMS_IN_THIS_ORGANIZATION", "message": "You are not allowed to create teams in this organization" }, "YOU_ARE_NOT_ALLOWED_TO_DELETE_TEAMS_IN_THIS_ORGANIZATION": { "code": "YOU_ARE_NOT_ALLOWED_TO_DELETE_TEAMS_IN_THIS_ORGANIZATION", "message": "You are not allowed to delete teams in this organization" }, "YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_TEAM": { "code": "YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_TEAM", "message": "You are not allowed to update this team" }, "YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_TEAM": { "code": "YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_TEAM", "message": "You are not allowed to delete this team" }, "INVITATION_LIMIT_REACHED": { "code": "INVITATION_LIMIT_REACHED", "message": "Invitation limit reached" }, "TEAM_MEMBER_LIMIT_REACHED": { "code": "TEAM_MEMBER_LIMIT_REACHED", "message": "Team member limit reached" }, "USER_IS_NOT_A_MEMBER_OF_THE_TEAM": { "code": "USER_IS_NOT_A_MEMBER_OF_THE_TEAM", "message": "User is not a member of the team" }, "YOU_CAN_NOT_ACCESS_THE_MEMBERS_OF_THIS_TEAM": { "code": "YOU_CAN_NOT_ACCESS_THE_MEMBERS_OF_THIS_TEAM", "message": "You are not allowed to list the members of this team" }, "YOU_DO_NOT_HAVE_AN_ACTIVE_TEAM": { "code": "YOU_DO_NOT_HAVE_AN_ACTIVE_TEAM", "message": "You do not have an active team" }, "YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_TEAM_MEMBER": { "code": "YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_TEAM_MEMBER", "message": "You are not allowed to create a new member" }, "YOU_ARE_NOT_ALLOWED_TO_REMOVE_A_TEAM_MEMBER": { "code": "YOU_ARE_NOT_ALLOWED_TO_REMOVE_A_TEAM_MEMBER", "message": "You are not allowed to remove a team member" }, "YOU_ARE_NOT_ALLOWED_TO_ACCESS_THIS_ORGANIZATION": { "code": "YOU_ARE_NOT_ALLOWED_TO_ACCESS_THIS_ORGANIZATION", "message": "You are not allowed to access this organization as an owner" }, "YOU_ARE_NOT_A_MEMBER_OF_THIS_ORGANIZATION": { "code": "YOU_ARE_NOT_A_MEMBER_OF_THIS_ORGANIZATION", "message": "You are not a member of this organization" }, "MISSING_AC_INSTANCE": { "code": "MISSING_AC_INSTANCE", "message": "Dynamic Access Control requires a pre-defined ac instance on the server auth plugin. Read server logs for more information" }, "YOU_MUST_BE_IN_AN_ORGANIZATION_TO_CREATE_A_ROLE": { "code": "YOU_MUST_BE_IN_AN_ORGANIZATION_TO_CREATE_A_ROLE", "message": "You must be in an organization to create a role" }, "YOU_ARE_NOT_ALLOWED_TO_CREATE_A_ROLE": { "code": "YOU_ARE_NOT_ALLOWED_TO_CREATE_A_ROLE", "message": "You are not allowed to create a role" }, "YOU_ARE_NOT_ALLOWED_TO_UPDATE_A_ROLE": { "code": "YOU_ARE_NOT_ALLOWED_TO_UPDATE_A_ROLE", "message": "You are not allowed to update a role" }, "YOU_ARE_NOT_ALLOWED_TO_DELETE_A_ROLE": { "code": "YOU_ARE_NOT_ALLOWED_TO_DELETE_A_ROLE", "message": "You are not allowed to delete a role" }, "YOU_ARE_NOT_ALLOWED_TO_READ_A_ROLE": { "code": "YOU_ARE_NOT_ALLOWED_TO_READ_A_ROLE", "message": "You are not allowed to read a role" }, "YOU_ARE_NOT_ALLOWED_TO_LIST_A_ROLE": { "code": "YOU_ARE_NOT_ALLOWED_TO_LIST_A_ROLE", "message": "You are not allowed to list a role" }, "YOU_ARE_NOT_ALLOWED_TO_GET_A_ROLE": { "code": "YOU_ARE_NOT_ALLOWED_TO_GET_A_ROLE", "message": "You are not allowed to get a role" }, "TOO_MANY_ROLES": { "code": "TOO_MANY_ROLES", "message": "This organization has too many roles" }, "INVALID_RESOURCE": { "code": "INVALID_RESOURCE", "message": "The provided permission includes an invalid resource" }, "ROLE_NAME_IS_ALREADY_TAKEN": { "code": "ROLE_NAME_IS_ALREADY_TAKEN", "message": "That role name is already taken" }, "CANNOT_DELETE_A_PRE_DEFINED_ROLE": { "code": "CANNOT_DELETE_A_PRE_DEFINED_ROLE", "message": "Cannot delete a pre-defined role" }, "ROLE_IS_ASSIGNED_TO_MEMBERS": { "code": "ROLE_IS_ASSIGNED_TO_MEMBERS", "message": "Cannot delete a role that is assigned to members. Please reassign the members to a different role first" } }, "options": { "ac": { "statements": { "organization": [ "update", "delete" ], "member": [ "create", "update", "delete" ], "invitation": [ "create", "cancel" ], "team": [ "create", "update", "delete" ], "ac": [ "create", "read", "update", "delete" ] } }, "roles": { "owner": { "statements": { "organization": [ "update", "delete" ], "member": [ "create", "update", "delete" ], "invitation": [ "create", "cancel" ], "team": [ "create", "update", "delete" ], "ac": [ "create", "read", "update", "delete" ] } }, "admin": { "statements": { "organization": [ "update" ], "invitation": [ "create", "cancel" ], "member": [ "create", "update", "delete" ], "team": [ "create", "update", "delete" ], "ac": [ "create", "read", "update", "delete" ] } }, "member": { "statements": { "organization": [], "member": [], "invitation": [], "team": [], "ac": [ "read" ] } }, "viewer": { "statements": { "organization": [], "member": [], "invitation": [], "team": [] } }, "creator": { "statements": { "organization": [], "member": [], "invitation": [], "team": [] } } }, "invitationExpiresIn": 604800, "cancelPendingInvitationsOnReInvite": true, "membershipLimit": 9007199254740991, "schema": { "invitation": { "modelName": "orgInvitation" }, "member": { "modelName": "orgMember" }, "organization": { "additionalFields": { "url": { "type": "string", "required": false, "input": true } } } }, "organizationHooks": {} } } }, { "name": "admin", "config": { "id": "admin", "hooks": { "after": [ {} ] }, "endpoints": {}, "$ERROR_CODES": { "FAILED_TO_CREATE_USER": { "code": "FAILED_TO_CREATE_USER", "message": "Failed to create user" }, "USER_ALREADY_EXISTS": { "code": "USER_ALREADY_EXISTS", "message": "User already exists." }, "USER_ALREADY_EXISTS_USE_ANOTHER_EMAIL": { "code": "USER_ALREADY_EXISTS_USE_ANOTHER_EMAIL", "message": "User already exists. Use another email." }, "YOU_CANNOT_BAN_YOURSELF": { "code": "YOU_CANNOT_BAN_YOURSELF", "message": "You cannot ban yourself" }, "YOU_ARE_NOT_ALLOWED_TO_CHANGE_USERS_ROLE": { "code": "YOU_ARE_NOT_ALLOWED_TO_CHANGE_USERS_ROLE", "message": "You are not allowed to change users role" }, "YOU_ARE_NOT_ALLOWED_TO_CREATE_USERS": { "code": "YOU_ARE_NOT_ALLOWED_TO_CREATE_USERS", "message": "You are not allowed to create users" }, "YOU_ARE_NOT_ALLOWED_TO_LIST_USERS": { "code": "YOU_ARE_NOT_ALLOWED_TO_LIST_USERS", "message": "You are not allowed to list users" }, "YOU_ARE_NOT_ALLOWED_TO_LIST_USERS_SESSIONS": { "code": "YOU_ARE_NOT_ALLOWED_TO_LIST_USERS_SESSIONS", "message": "You are not allowed to list users sessions" }, "YOU_ARE_NOT_ALLOWED_TO_BAN_USERS": { "code": "YOU_ARE_NOT_ALLOWED_TO_BAN_USERS", "message": "You are not allowed to ban users" }, "YOU_ARE_NOT_ALLOWED_TO_IMPERSONATE_USERS": { "code": "YOU_ARE_NOT_ALLOWED_TO_IMPERSONATE_USERS", "message": "You are not allowed to impersonate users" }, "YOU_ARE_NOT_ALLOWED_TO_REVOKE_USERS_SESSIONS": { "code": "YOU_ARE_NOT_ALLOWED_TO_REVOKE_USERS_SESSIONS", "message": "You are not allowed to revoke users sessions" }, "YOU_ARE_NOT_ALLOWED_TO_DELETE_USERS": { "code": "YOU_ARE_NOT_ALLOWED_TO_DELETE_USERS", "message": "You are not allowed to delete users" }, "YOU_ARE_NOT_ALLOWED_TO_SET_USERS_PASSWORD": { "code": "YOU_ARE_NOT_ALLOWED_TO_SET_USERS_PASSWORD", "message": "You are not allowed to set users password" }, "BANNED_USER": { "code": "BANNED_USER", "message": "You have been banned from this application" }, "YOU_ARE_NOT_ALLOWED_TO_GET_USER": { "code": "YOU_ARE_NOT_ALLOWED_TO_GET_USER", "message": "You are not allowed to get user" }, "NO_DATA_TO_UPDATE": { "code": "NO_DATA_TO_UPDATE", "message": "No data to update" }, "YOU_ARE_NOT_ALLOWED_TO_UPDATE_USERS": { "code": "YOU_ARE_NOT_ALLOWED_TO_UPDATE_USERS", "message": "You are not allowed to update users" }, "YOU_CANNOT_REMOVE_YOURSELF": { "code": "YOU_CANNOT_REMOVE_YOURSELF", "message": "You cannot remove yourself" }, "YOU_ARE_NOT_ALLOWED_TO_SET_NON_EXISTENT_VALUE": { "code": "YOU_ARE_NOT_ALLOWED_TO_SET_NON_EXISTENT_VALUE", "message": "You are not allowed to set a non-existent role value" }, "YOU_CANNOT_IMPERSONATE_ADMINS": { "code": "YOU_CANNOT_IMPERSONATE_ADMINS", "message": "You cannot impersonate admins" }, "INVALID_ROLE_TYPE": { "code": "INVALID_ROLE_TYPE", "message": "Invalid role type" } }, "schema": { "user": { "fields": { "role": { "type": "string", "required": false, "input": false }, "banned": { "type": "boolean", "defaultValue": false, "required": false, "input": false }, "banReason": { "type": "string", "required": false, "input": false }, "banExpires": { "type": "date", "required": false, "input": false } } }, "session": { "fields": { "impersonatedBy": { "type": "string", "required": false } } } }, "options": { "adminUserIds": [ "user_TpCXtDU74dCr", "user_oopmG2v7mgRG", "user_zX1CZ1MqaHXq" ], "impersonationSessionDuration": 3600 } } }, { "name": "mcp", "config": { "id": "mcp", "hooks": { "after": [ {} ] }, "endpoints": {}, "schema": { "oauthApplication": { "modelName": "oauthApplication", "fields": { "name": { "type": "string" }, "icon": { "type": "string", "required": false }, "metadata": { "type": "string", "required": false }, "clientId": { "type": "string", "unique": true }, "clientSecret": { "type": "string", "required": false }, "redirectUrls": { "type": "string" }, "type": { "type": "string" }, "disabled": { "type": "boolean", "required": false, "defaultValue": false }, "userId": { "type": "string", "required": false, "references": { "model": "user", "field": "id", "onDelete": "cascade" }, "index": true }, "createdAt": { "type": "date" }, "updatedAt": { "type": "date" } } }, "oauthAccessToken": { "modelName": "oauthAccessToken", "fields": { "accessToken": { "type": "string", "unique": true }, "refreshToken": { "type": "string", "unique": true }, "accessTokenExpiresAt": { "type": "date" }, "refreshTokenExpiresAt": { "type": "date" }, "clientId": { "type": "string", "references": { "model": "oauthApplication", "field": "clientId", "onDelete": "cascade" }, "index": true }, "userId": { "type": "string", "required": false, "references": { "model": "user", "field": "id", "onDelete": "cascade" }, "index": true }, "scopes": { "type": "string" }, "createdAt": { "type": "date" }, "updatedAt": { "type": "date" } } }, "oauthConsent": { "modelName": "oauthConsent", "fields": { "clientId": { "type": "string", "references": { "model": "oauthApplication", "field": "clientId", "onDelete": "cascade" }, "index": true }, "userId": { "type": "string", "references": { "model": "user", "field": "id", "onDelete": "cascade" }, "index": true }, "scopes": { "type": "string" }, "createdAt": { "type": "date" }, "updatedAt": { "type": "date" }, "consentGiven": { "type": "boolean" } } } }, "options": { "loginPage": "/auth/sign-up", "oidcConfig": { "loginPage": "/auth/sign-up" } } } }, { "name": "api-key", "config": { "id": "api-key", "$ERROR_CODES": { "INVALID_METADATA_TYPE": { "code": "INVALID_METADATA_TYPE", "message": "metadata must be an object or undefined" }, "REFILL_AMOUNT_AND_INTERVAL_REQUIRED": { "code": "REFILL_AMOUNT_AND_INTERVAL_REQUIRED", "message": "refillAmount is required when refillInterval is provided" }, "REFILL_INTERVAL_AND_AMOUNT_REQUIRED": { "code": "REFILL_INTERVAL_AND_AMOUNT_REQUIRED", "message": "refillInterval is required when refillAmount is provided" }, "USER_BANNED": { "code": "USER_BANNED", "message": "User is banned" }, "UNAUTHORIZED_SESSION": { "code": "UNAUTHORIZED_SESSION", "message": "Unauthorized or invalid session" }, "KEY_NOT_FOUND": { "code": "KEY_NOT_FOUND", "message": "API Key not found" }, "KEY_DISABLED": { "code": "KEY_DISABLED", "message": "API Key is disabled" }, "KEY_EXPIRED": { "code": "KEY_EXPIRED", "message": "API Key has expired" }, "USAGE_EXCEEDED": { "code": "USAGE_EXCEEDED", "message": "API Key has reached its usage limit" }, "KEY_NOT_RECOVERABLE": { "code": "KEY_NOT_RECOVERABLE", "message": "API Key is not recoverable" }, "EXPIRES_IN_IS_TOO_SMALL": { "code": "EXPIRES_IN_IS_TOO_SMALL", "message": "The expiresIn is smaller than the predefined minimum value." }, "EXPIRES_IN_IS_TOO_LARGE": { "code": "EXPIRES_IN_IS_TOO_LARGE", "message": "The expiresIn is larger than the predefined maximum value." }, "INVALID_REMAINING": { "code": "INVALID_REMAINING", "message": "The remaining count is either too large or too small." }, "INVALID_PREFIX_LENGTH": { "code": "INVALID_PREFIX_LENGTH", "message": "The prefix length is either too large or too small." }, "INVALID_NAME_LENGTH": { "code": "INVALID_NAME_LENGTH", "message": "The name length is either too large or too small." }, "METADATA_DISABLED": { "code": "METADATA_DISABLED", "message": "Metadata is disabled." }, "RATE_LIMIT_EXCEEDED": { "code": "RATE_LIMIT_EXCEEDED", "message": "Rate limit exceeded." }, "NO_VALUES_TO_UPDATE": { "code": "NO_VALUES_TO_UPDATE", "message": "No values to update." }, "KEY_DISABLED_EXPIRATION": { "code": "KEY_DISABLED_EXPIRATION", "message": "Custom key expiration values are disabled." }, "INVALID_API_KEY": { "code": "INVALID_API_KEY", "message": "Invalid API key." }, "INVALID_USER_ID_FROM_API_KEY": { "code": "INVALID_USER_ID_FROM_API_KEY", "message": "The user id from the API key is invalid." }, "INVALID_REFERENCE_ID_FROM_API_KEY": { "code": "INVALID_REFERENCE_ID_FROM_API_KEY", "message": "The reference id from the API key is invalid." }, "INVALID_API_KEY_GETTER_RETURN_TYPE": { "code": "INVALID_API_KEY_GETTER_RETURN_TYPE", "message": "API Key getter returned an invalid key type. Expected string." }, "SERVER_ONLY_PROPERTY": { "code": "SERVER_ONLY_PROPERTY", "message": "The property you're trying to set can only be set from the server auth instance only." }, "FAILED_TO_UPDATE_API_KEY": { "code": "FAILED_TO_UPDATE_API_KEY", "message": "Failed to update API key" }, "NAME_REQUIRED": { "code": "NAME_REQUIRED", "message": "API Key name is required." }, "ORGANIZATION_ID_REQUIRED": { "code": "ORGANIZATION_ID_REQUIRED", "message": "Organization ID is required for organization-owned API keys." }, "USER_NOT_MEMBER_OF_ORGANIZATION": { "code": "USER_NOT_MEMBER_OF_ORGANIZATION", "message": "You are not a member of the organization that owns this API key." }, "INSUFFICIENT_API_KEY_PERMISSIONS": { "code": "INSUFFICIENT_API_KEY_PERMISSIONS", "message": "You do not have permission to perform this action on organization API keys." }, "NO_DEFAULT_API_KEY_CONFIGURATION_FOUND": { "code": "NO_DEFAULT_API_KEY_CONFIGURATION_FOUND", "message": "No default api-key configuration found." }, "ORGANIZATION_PLUGIN_REQUIRED": { "code": "ORGANIZATION_PLUGIN_REQUIRED", "message": "Organization plugin is required for organization-owned API keys. Please install and configure the organization plugin." } }, "hooks": { "before": [ {} ] }, "endpoints": {}, "schema": { "apikey": { "fields": { "configId": { "type": "string", "required": true, "defaultValue": "default", "input": false, "index": true }, "name": { "type": "string", "required": false, "input": false }, "start": { "type": "string", "required": false, "input": false }, "referenceId": { "type": "string", "required": true, "input": false, "index": true }, "prefix": { "type": "string", "required": false, "input": false }, "key": { "type": "string", "required": true, "input": false, "index": true }, "refillInterval": { "type": "number", "required": false, "input": false }, "refillAmount": { "type": "number", "required": false, "input": false }, "lastRefillAt": { "type": "date", "required": false, "input": false }, "enabled": { "type": "boolean", "required": false, "input": false, "defaultValue": true }, "rateLimitEnabled": { "type": "boolean", "required": false, "input": false, "defaultValue": true }, "rateLimitTimeWindow": { "type": "number", "required": false, "input": false, "defaultValue": 86400000 }, "rateLimitMax": { "type": "number", "required": false, "input": false, "defaultValue": 10 }, "requestCount": { "type": "number", "required": false, "input": false, "defaultValue": 0 }, "remaining": { "type": "number", "required": false, "input": false }, "lastRequest": { "type": "date", "required": false, "input": false }, "expiresAt": { "type": "date", "required": false, "input": false }, "createdAt": { "type": "date", "required": true, "input": false }, "updatedAt": { "type": "date", "required": true, "input": false }, "permissions": { "type": "string", "required": false, "input": false }, "metadata": { "type": "string", "required": false, "input": true, "transform": {} } } } }, "configurations": [ { "apiKeyHeaders": [ "x-api-key" ], "enableMetadata": true, "enableSessionForAPIKeys": true, "defaultKeyLength": 64, "maximumPrefixLength": 32, "minimumPrefixLength": 1, "maximumNameLength": 32, "minimumNameLength": 1, "disableKeyHashing": false, "requireName": false, "storage": "database", "rateLimit": { "enabled": true, "timeWindow": 86400000, "maxRequests": 10 }, "keyExpiration": { "defaultExpiresIn": null, "disableCustomExpiresTime": false, "maxExpiresIn": 365, "minExpiresIn": 1 }, "startingCharactersConfig": { "shouldStore": true, "charactersLength": 6 }, "fallbackToDatabase": false, "deferUpdates": false } ] } }, { "name": "next-cookies", "config": { "id": "next-cookies", "hooks": { "before": [ {} ], "after": [ {} ] } } }, { "name": "passkey", "config": { "id": "passkey", "endpoints": {}, "schema": { "passkey": { "fields": { "name": { "type": "string", "required": false }, "publicKey": { "type": "string", "required": true }, "userId": { "type": "string", "references": { "model": "user", "field": "id" }, "required": true, "index": true }, "credentialID": { "type": "string", "required": true, "index": true }, "counter": { "type": "number", "required": true }, "deviceType": { "type": "string", "required": true }, "backedUp": { "type": "boolean", "required": true }, "transports": { "type": "string", "required": false }, "createdAt": { "type": "date", "required": false }, "aaguid": { "type": "string", "required": false } } } }, "$ERROR_CODES": { "CHALLENGE_NOT_FOUND": { "code": "CHALLENGE_NOT_FOUND", "message": "Challenge not found" }, "YOU_ARE_NOT_ALLOWED_TO_REGISTER_THIS_PASSKEY": { "code": "YOU_ARE_NOT_ALLOWED_TO_REGISTER_THIS_PASSKEY", "message": "You are not allowed to register this passkey" }, "FAILED_TO_VERIFY_REGISTRATION": { "code": "FAILED_TO_VERIFY_REGISTRATION", "message": "Failed to verify registration" }, "PASSKEY_NOT_FOUND": { "code": "PASSKEY_NOT_FOUND", "message": "Passkey not found" }, "AUTHENTICATION_FAILED": { "code": "AUTHENTICATION_FAILED", "message": "Authentication failed" }, "UNABLE_TO_CREATE_SESSION": { "code": "UNABLE_TO_CREATE_SESSION", "message": "Unable to create session" }, "FAILED_TO_UPDATE_PASSKEY": { "code": "FAILED_TO_UPDATE_PASSKEY", "message": "Failed to update passkey" } }, "options": { "rpName": "[REDACTED]", "rpID": "localhost" } } } ], "advanced": { "database": {} }, "experimental": { "joins": true } } } } ``` ### Which area(s) are affected? (Select all that apply) Backend ### Auth config (if applicable) ```typescript import { betterAuth } from "better-auth" export const auth = betterAuth({ // … database: drizzleAdapter(db, { provider: "pg", usePlural: true, schema }), // … }); ``` ### Additional context _No response_
GiteaMirror added the lockedbug labels 2026-04-17 19:50:05 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#28387