PHPackages                             olivmai/linkvalue-oauth2-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. olivmai/linkvalue-oauth2-bundle

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

olivmai/linkvalue-oauth2-bundle
===============================

Linkvalue OAuth 2.0 Client Provider for authentication through LV Connect

1.1.2(6y ago)07MITPHP

Since Aug 16Pushed 6y agoCompare

[ Source](https://github.com/olivmai/linkvalue-oauth2-bundle)[ Packagist](https://packagist.org/packages/olivmai/linkvalue-oauth2-bundle)[ RSS](/packages/olivmai-linkvalue-oauth2-bundle/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (5)Dependencies (1)Versions (6)Used By (0)

LV Connect OAuth provider
=========================

[](#lv-connect-oauth-provider)

This package provides Linvalue OAuth 2.0 support for an authentication through [LV Connect](https://github.com/Linkvalue-Interne/LvConnect).

Installation
------------

[](#installation)

```
composer require olivmai/linkvalue-oauth2-bundle
```

Usage
-----

[](#usage)

### Register the new Bundle

[](#register-the-new-bundle)

```
# config/bundles.php
return [
    /* ... */
    Olivmai\LinkvalueOAuth2Bundle\LinkvalueOAuth2Bundle::class => ['all' => true],
];
```

### Add Configuration file

[](#add-configuration-file)

Create a configuration file named linkvalue\_oauth2.yaml in the config/packages directory and then fill it with the following :

```
# config/packeges/linkvalue_oauth2.yaml
linkvalue_oauth2:
    client_id: '%env(resolve:OAUTH_LINKVALUE_APP_ID)%'
    client_secret: '%env(resolve:OAUTH_LINKVALUE_APP_SECRET)%'
    redirect_uri: '%env(resolve:OAUTH_LINKVALUE_REDIRECT_URL)%'
    scopes: '%env(resolve:OAUTH_LINKVALUE_SCOPE)%'
```

Finally, make sure you have the env variables configured in your project

### Add a controller

[](#add-a-controller)

The minimum controller code could look like that. connectCheckAction is empty because we use a guard authnetication based but you are free to implement your own logic here if needed.

```
