# Authentification Using Device Flow

### **Login**

To login, run the following command:

```
kaas-cli login
```

You will be prompted with this message:

```
Your user code: A111-B333
Open the link and type your code: https://github.com/login/device
Then hit 'Enter'.
Press Enter to continue or type 'q' to quit: 
```

Follow the link in the browser, and you will see the following window:

<figure><img src="/files/qeLkrolmqAPn54onJKeL" alt=""><figcaption></figcaption></figure>

Copy the code from the terminal and paste it into the browser. Then click "Continue." After the code is confirmed, click the "Authorize runtimeverification" button.

<figure><img src="/files/8lSFTJXwvDMxfAJ39b4y" alt=""><figcaption></figcaption></figure>

You will then see the message below.

<figure><img src="/files/CT8mnVhiK5RAqOASTazQ" alt=""><figcaption></figcaption></figure>

You can now return to the terminal where the `cli` is open and click "Enter." You will see this message:

```
You pressed Enter. The application continues...
Access token received. We store it in the cache folder.
```

To confirm that you are logged in, run the following command:

```
kaas-cli check-auth
```

If you are logged in you will see the following output in your terminal:

```
You are currently authenticated.
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.runtimeverification.com/kaas/guides/kaas-cli_connecting-using-device-flow.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
