app.views_auth

Attributes

auth_bp

Functions

load_user(user_id)

This function is used to load the user object from the user ID stored in the session.

unauthorized_callback()

This function is used to handle unauthorized access to protected routes.

logout()

This function is used to log out the user and redirect them to the login page.

register()

The view function for the registration page.

login()

The view function for the login page.

two_factor()

The view function for the two factor authentication page.

email_confirmation_by_code()

The view function for the email verification page.

password_reset()

The view function for the password reset page.

password_reset_requested()

The view function for the password reset requested page.

set_new_password(token)

The view function for the set new password page.

get_google_sso_config()

Get the Google SSO configuration.

login_callback_google()

The view function for the Google login callback.

Module Contents

app.views_auth.auth_bp[source]
app.views_auth.load_user(user_id)[source]

This function is used to load the user object from the user ID stored in the session.

Parameters:

user_id (str) – The ID of the user to load.

Returns:

The user object from the db corresponding to the user ID.

Return type:

Users

app.views_auth.unauthorized_callback()[source]

This function is used to handle unauthorized access to protected routes.

403 cases will be redirected to login

app.views_auth.logout()[source]

This function is used to log out the user and redirect them to the login page.

app.views_auth.register()[source]

The view function for the registration page.

app.views_auth.login()[source]

The view function for the login page.

app.views_auth.two_factor()[source]

The view function for the two factor authentication page.

app.views_auth.email_confirmation_by_code()[source]

The view function for the email verification page.

app.views_auth.password_reset()[source]

The view function for the password reset page.

app.views_auth.password_reset_requested()[source]

The view function for the password reset requested page.

app.views_auth.set_new_password(token)[source]

The view function for the set new password page.

Parameters:

token (str) – The token from the forgot password email, used to verify the user.

app.views_auth.get_google_sso_config()[source]

Get the Google SSO configuration.

Returns:

The Google SSO configuration.

Return type:

dict

app.views_auth.login_callback_google()[source]

The view function for the Google login callback.

This is the page that Google redirects to after the Google authentication attempt.