Guidelines

Sign up and Sign in

Sign up and Sign in

Introduction

The login functionality in Langflow serves to authenticate users and protect sensitive routes in the application. Starting from version 0.5, Langflow introduces an enhanced login mechanism that is governed by a few environment variables. This allows new secure features.

Environment Variables

The following environment variables are crucial in configuring the login settings:

  • LANGFLOW_AUTO_LOGIN: Determines whether Langflow should automatically log users in. Default is True.

  • LANGFLOW_SUPERUSER: The username of the superuser.

  • LANGFLOW_SUPERUSER_PASSWORD: The password for the superuser.

  • LANGFLOW_SECRET_KEY: A key used for encrypting the superuser's password.

  • LANGFLOW_NEW_USER_IS_ACTIVE: Determines whether new users are automatically activated. Default is False.

All of these variables can be passed to the CLI command langflow run through the --env-file option. For example:

langflow run --env-file .env

INFO

It is critical not to expose these environment variables in your code repository. Always set them securely in your deployment environment, for example, using Docker secrets, Kubernetes ConfigMaps/Secrets, or dedicated secure environment configuration systems like AWS Secrets Manager.

LANGFLOW_AUTO_LOGIN

By default, this variable is set to True. When enabled (True), Langflow operates as it did in versions prior to 0.5β€”automatic login without requiring explicit user authentication.

To disable automatic login and enforce user authentication:

export LANGFLOW_AUTO_LOGIN=False

LANGFLOW_SUPERUSER and LANGFLOW_SUPERUSER_PASSWORD

These environment variables are only relevant when LANGFLOW_AUTO_LOGIN is set to False. They specify the username and password for the superuser, which is essential for administrative tasks.

To create a superuser manually:

export LANGFLOW_SUPERUSER=admin
export LANGFLOW_SUPERUSER_PASSWORD=securepassword

You can also use the CLI command langflow superuser to set up a superuser interactively.

LANGFLOW_SECRET_KEY

This environment variable holds a secret key used for encrypting the superuser's password. Make sure to set this to a secure, randomly generated string.

export LANGFLOW_SECRET_KEY=randomly_generated_secure_key

LANGFLOW_NEW_USER_IS_ACTIVE

By default, this variable is set to False. When enabled (True), new users are automatically activated and can log in without requiring explicit activation by the superuser.

Command-Line Interface

Langflow provides a command-line utility for managing superusers:

langflow superuser

This command prompts you to enter the username and password for the superuser, unless they are already set using environment variables.

Sign up

With LANGFLOW_AUTO_LOGIN set to False, Langflow requires users to sign up before they can log in. The sign-up page is the default landing page when a user visits Langflow for the first time.

Profile settings

Users can change their profile settings by clicking on the profile icon in the top right corner of the application. This opens a dropdown menu with the following options:

  • Admin Page: Opens the admin page, which is only accessible to the superuser.

  • Profile Settings: Opens the profile settings page.

  • Sign Out: Logs the user out.

Users can change their profile settings by clicking on the profile icon in the top right corner of the application. This opens a dropdown menu with the following options:

  • Admin Page: Opens the admin page, which is only accessible to the superuser.

  • Profile Settings: Opens the profile settings page.

  • Sign Out: Logs the user out.

By clicking on Profile Settings, the user is taken to the profile settings page, where they can change their password and their profile picture.

By clicking on Admin Page, the superuser is taken to the admin page, where they can manage users and groups.

Getting Started

πŸ‘‹ Welcome to Langflow
πŸ“¦ How to install?
πŸ€— HuggingFace Spaces
🎨 Creating Flows

Guidelines

Sign up and Sign in
API Keys
Assynchronous Processing
Component
Features
Collection
Prompt Customization
Chat Interface
Chat Widget
Custom Components

Step-by-Step Guides

Async API
Integrating documents with prompt variables
Building chatbots with System Message
Integrating Langfuse with Langflow

Examples

FlowRunner Component
Conversation Chain
Buffer Memory
MidJourney Prompt Chain
CSV Loader
Serp API Tool
Multiple Vector Stores
Python Function
πŸ“š How to Upload Examples?

Deployment

Deploy on Google Cloud Platform

Contributing

How to contribute?
GitHub Issues
Community

Search Docs…

Search Docs…