diff --git a/Client/Provider/InstagramClient.php b/Client/Provider/InstagramClient.php
new file mode 100644
index 00000000..f0a9fd9a
--- /dev/null
+++ b/Client/Provider/InstagramClient.php
@@ -0,0 +1,27 @@
+ 'KnpU\OAuth2ClientBundle\DependencyInjection\Providers\LinkedInProviderConfigurator',
'google' => 'KnpU\OAuth2ClientBundle\DependencyInjection\Providers\GoogleProviderConfigurator',
'eve_online' => 'KnpU\OAuth2ClientBundle\DependencyInjection\Providers\EveOnlineProviderConfigurator',
+ 'instagram' => 'KnpU\OAuth2ClientBundle\DependencyInjection\Providers\InstagramProviderConfigurator',
'generic' => 'KnpU\OAuth2ClientBundle\DependencyInjection\Providers\GenericProviderConfigurator'
);
diff --git a/DependencyInjection/Providers/InstagramProviderConfigurator.php b/DependencyInjection/Providers/InstagramProviderConfigurator.php
new file mode 100644
index 00000000..002c9d16
--- /dev/null
+++ b/DependencyInjection/Providers/InstagramProviderConfigurator.php
@@ -0,0 +1,48 @@
+ $config['client_id'],
+ 'clientSecret' => $config['client_secret'],
+ );
+ }
+
+ public function getPackagistName()
+ {
+ return 'league/oauth2-instagram';
+ }
+
+ public function getLibraryHomepage()
+ {
+ return 'https://github.com/thephpleague/oauth2-instagram';
+ }
+
+ public function getProviderDisplayName()
+ {
+ return 'Instagram';
+ }
+
+ public function getClientClass(array $config)
+ {
+ return InstagramClient::class;
+ }
+}
diff --git a/README.md b/README.md
index 8cd7b8d9..864a00ee 100644
--- a/README.md
+++ b/README.md
@@ -54,14 +54,15 @@ via Composer:
-| OAuth2 Provider | Install |
-| ------------------------------------------------------------ | ------------------------------------------ |
-| [Facebook](https://github.com/thephpleague/oauth2-facebook) | composer require league/oauth2-facebook |
-| [GitHub](https://github.com/thephpleague/oauth2-github) | composer require league/oauth2-github |
-| [LinkedIn](https://github.com/thephpleague/oauth2-linkedin) | composer require league/oauth2-linkedin |
-| [Google](https://github.com/thephpleague/oauth2-google) | composer require league/oauth2-google |
-| [Eve Online](https://github.com/evelabs/oauth2-eveonline) | composer require evelabs/oauth2-eveonline |
-| generic | configure any unsupported provider |
+| OAuth2 Provider | Install |
+| -------------------------------------------------------------- | ------------------------------------------ |
+| [Facebook](https://github.com/thephpleague/oauth2-facebook) | composer require league/oauth2-facebook |
+| [GitHub](https://github.com/thephpleague/oauth2-github) | composer require league/oauth2-github |
+| [LinkedIn](https://github.com/thephpleague/oauth2-linkedin) | composer require league/oauth2-linkedin |
+| [Google](https://github.com/thephpleague/oauth2-google) | composer require league/oauth2-google |
+| [Eve Online](https://github.com/evelabs/oauth2-eveonline) | composer require evelabs/oauth2-eveonline |
+| [Instagram](https://github.com/thephpleague/oauth2-instagram) | composer require league/oauth2-instagram |
+| generic | configure any unsupported provider |
@@ -390,6 +391,22 @@ knpu_oauth2_client:
redirect_route: connect_eve_online_check
redirect_params: {}
+ # whether to check OAuth2 "state": defaults to true
+ # use_state: true
+
+ # will create service: "knpu.oauth2.client.instagram"
+ # an instance of: KnpU\OAuth2ClientBundle\Client\Provider\InstagramClient
+ # composer require league/oauth2-instagram
+ instagram:
+ # must be "instagram" - it activates that type!
+ type: instagram
+ # add and configure client_id and client_secret in parameters.yml
+ client_id: %instagram_client_id%
+ client_secret: %instagram_client_secret%
+ # a route name you'll create
+ redirect_route: connect_instagram_check
+ redirect_params: {}
+
# whether to check OAuth2 "state": defaults to true
# use_state: true
```