> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kavachos.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Naver

> Authenticate users via Naver OAuth 2.0. Create a Naver Developer application, enable Naver Login, set the redirect URI, and configure `name` and `email` scopes.

## Setup

<Steps>
  <Step>
    ### Get credentials

    Go to [developers.naver.com](https://developers.naver.com) and create an application. Under **API Settings**, add **Naver Login** and set your redirect URI:

    ```
    https://your-app.com/api/kavach/auth/oauth/callback/naver
    ```
  </Step>

  <Step>
    ### Configure

    ```ts title="lib/kavach.ts" theme={"system"}
    import { createKavach } from 'kavachos';
    import { oauth } from 'kavachos/auth';

    const kavach = await createKavach({
      database: { provider: 'sqlite', url: 'kavach.db' },
      plugins: [
        oauth({
          providers: [
            {
              id: 'naver',
              clientId: process.env.NAVER_CLIENT_ID!,
              clientSecret: process.env.NAVER_CLIENT_SECRET!,
            },
          ],
        }),
      ],
    });
    ```

    ```bash theme={"system"}
    NAVER_CLIENT_ID=...
    NAVER_CLIENT_SECRET=...
    ```
  </Step>
</Steps>

## Scopes

Default scopes: `name`, `email`

| Scope           | What it unlocks     |
| --------------- | ------------------- |
| `name`          | Display name        |
| `email`         | Email address       |
| `profile_image` | Profile image URL   |
| `mobile`        | Mobile phone number |

## Endpoints

| Method | Path                          | Description       |
| ------ | ----------------------------- | ----------------- |
| GET    | `/auth/oauth/authorize/naver` | Redirect to Naver |
| GET    | `/auth/oauth/callback/naver`  | Handle callback   |
