Exemplo n.º 1
0
def default_confirmation_link_func(user):
    """Return the confirmation link that will be sent to a user via email."""
    token = generate_confirmation_token(user)
    endpoint = current_app.config[
        "ACCOUNTS_CONFIRM_EMAIL_ENDPOINT"] or get_security_endpoint_name(
            "confirm_email")
    return token, _generate_token_url(endpoint, token)
Exemplo n.º 2
0
def default_reset_password_link_func(user):
    """Return the reset password link that will be sent to a user via email."""
    token = generate_reset_password_token(user)
    endpoint = current_app.config[
        "ACCOUNTS_RESET_PASSWORD_ENDPOINT"] or get_security_endpoint_name(
            "reset_password")
    return token, _generate_token_url(endpoint, token)