Login Command
The fastapi login command authenticates you with FastAPI Cloud. đ
This allows you to deploy applications and manage your FastAPI Cloud resources from the CLI.
fastapi loginThe command will automatically open your browser to complete the authentication.
What Happens When You Login
Section titled âWhat Happens When You LoginâWhen you run fastapi login, the CLI will:
- Start a device authorization flow
- Open your browser to the FastAPI Cloud login page
- Wait for you to authorize the device
- Store your authentication credentials locally
Where Credentials Are Stored
Section titled âWhere Credentials Are StoredâYour authentication credentials are stored locally on your system in a configuration file.
These credentials are system-wide for the current user, not project-specific. Once logged in, you can deploy any FastAPI application without logging in again.
Login vs Project Configuration
Section titled âLogin vs Project ConfigurationâItâs important to understand the difference:
fastapi login- System-wide authentication (run once).fastapiclouddirectory - Project-specific configuration (created byfastapi deploy)
You need to be logged in to deploy, but each project has its own deployment configuration.
Important Notes
Section titled âImportant NotesâYou only need to log in once. The credentials persist across terminal sessions until you explicitly log out.
Troubleshooting
Section titled âTroubleshootingâAuthorization Timeout
Section titled âAuthorization TimeoutâIf you donât complete the authorization in time, the process will timeout. Simply run fastapi login again.
Related Commands
Section titled âRelated Commandsâfastapi cloud logout- Log out from FastAPI Cloudfastapi cloud whoami- Check your current authentication statusfastapi deploy- Deploy an application (requires login)