Skip to main content

Login Authentication

Before using Lovrabet CLI, you need to log in to your account first. This process is like opening an app on your phone for the first time and needing to log in.

Why Do You Need to Log In?

After logging in, CLI can:

  • Retrieve your project information from the backend
  • Automatically generate API calling code
  • Access features that only you can use

Simply put, it lets the system know "who you are".

How to Log In

Just one command:

# Execute in terminal (Windows users recommended to use Git Bash)
lovrabet auth

Then press Enter and wait for the browser to open automatically.

Login Authentication Demo

Login Process Explained

Don't worry, the entire process is very simple:

1️⃣ Check Login Status

CLI first checks if you're already logged in. If already logged in, no need to repeat the process.

2️⃣ Start Local Server

If login is needed, CLI will start a temporary server on your computer (don't worry, only your local machine can access it).

3️⃣ Open Browser

CLI will display the login link and try to automatically open the browser. If the browser doesn't open automatically, you can manually copy the displayed link and open it in your browser.

If browser opens automatically: Just enter your username and password on the page.

If browser doesn't open automatically:

  1. Find the displayed login link in the terminal (usually in https://localhost:xxxx format)
  2. Copy this link
  3. Manually open browser, paste the link and visit
  4. Enter your username and password on the opened page

4️⃣ Complete Login

After successful login, the browser will redirect back to the local page, and CLI will automatically save your login information.

5️⃣ Exit

After the terminal shows "Login successful", press q to exit.

Where is Login Information Stored?

Your login information is securely stored at:

  • Cookie file: ~/.lovrabet/cookie
  • Config directory: ~/.lovrabet/

Explanation: ~ represents your user home directory. On Windows it's C:\Users\YourUsername, on Mac/Linux it's /Users/YourUsername or /home/YourUsername.

FAQ

Issue 1: Browser doesn't open automatically

Solution:

  • Manually copy the login link shown in terminal and open it in browser
  • Windows users: In Git Bash, you can right-click to select and copy the link
  • If you frequently encounter this issue, check your system's default browser settings

Issue 2: Want to switch to another account

Solution:

  1. Delete the login information file:
    rm ~/.lovrabet/cookie
  2. Log in again:
    lovrabet auth

Issue 3: Browser shows "insecure connection"

Reason: Local server uses self-signed certificate, browser will show warning.

Solution: Click "Advanced" or "Details", select "Continue" or "Proceed anyway".

Tips

  • Must log in before first use: Please execute lovrabet auth before using other features
  • Login status persists: After one login, you won't need to log in again for a long time
  • Safe and secure: Login information is only saved on your local computer