# `Assent.Strategy.VK`
[🔗](https://github.com/pow-auth/assent/blob/v0.4.0/lib/assent/strategies/vk.ex#L1)

VK.com OAuth 2.0 strategy.

The VK token endpoint does not provide data on email verification, email is
considered unverified.

## Configuration

  * `:user_url_params` - parameters to send along with the user fetch
    request, merged with the defaults, optional, defaults to
    `[fields: "photo_200,screen_name", v: "5.199"]`

See `Assent.Strategy.OAuth2` for more.

## Usage

    config = [
      client_id: "REPLACE_WITH_CLIENT_ID",
      client_secret: "REPLACE_WITH_CLIENT_SECRET",
      redirect_uri: "http://localhost:4000/auth/callback"
    ]

# `authorize_url`

```elixir
@spec authorize_url(Keyword.t()) :: Assent.Strategy.OAuth2.on_authorize_url()
```

Generates an OAuth 2.0 authorization URL.

# `callback`

```elixir
@spec callback(Keyword.t(), map()) :: Assent.Strategy.OAuth2.on_callback()
```

Handles an OAuth 2.0 callback.

# `fetch_user`

```elixir
@spec fetch_user(Keyword.t(), map()) :: {:ok, map()} | {:error, term()}
```

Fetches user data using the access token returned by the provider.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
