These interfaces and implementations control the user registration flow in FlaskBB.

Registration Interfaces

class flaskbb.core.auth.registration.UserRegistrationInfo(username, password, email, language, group)[source]

User registration object, contains all relevant information for validating and creating a new user.

class flaskbb.core.auth.registration.UserValidator[source]

Used to validate user registrations and stop the registration process by raising a ValidationError.


This method is abstract.

Parameters:user_info (UserRegistrationInfo) – The provided registration information.
class flaskbb.core.auth.registration.UserRegistrationService[source]

Used to manage the registration process. A default implementation is provided however, this interface is provided in case alternative flows are needed.


This method is abstract.

Parameters:user_info (UserRegistrationInfo) – The provided user registration information.
class flaskbb.core.auth.registration.RegistrationFailureHandler[source]

Used to handle failures in the registration process.

handle_failure(user_info, failures)[source]

This method is abstract.

  • user_info (UserRegistrationInfo) – The provided registration information.
  • failures – Tuples of (attribute, message) from the failure
class flaskbb.core.auth.registration.RegistrationPostProcessor[source]

Used to post proccess successful registrations by the time this interface is called, the user has already been persisted into the database.


This method is abstract.

Parameters:user (User) – The registered, persisted user.

Registration Provided Implementations

class, max, blacklist)[source]

Configuration for username requirements, minimum and maximum length and disallowed names.


Validates that the username for the registering user meets the minimum requirements (appropriate length, not a forbidden name).


Validates that the provided username is unique in the application.


Validates that the provided email is unique in the application.


Sends an activation request after registration

Parameters:account_activator (AccountActivator) –

Automatically logs a user in after registration

class, config)[source]

Automatically marks the user as activated if activation isn’t required for the forum.

  • db – Configured Flask-SQLAlchemy extension object
  • config – Current flaskbb configuration object
class, users, db)[source]

Default registration service for FlaskBB, runs the registration information against the provided validators and if it passes, creates the user.

If any of the provided UserValidators raise a ValidationError then the register method will raise a StopValidation with all reasons why the registration was prevented.