Oauth2 in Symfony2

13,809

Solution 1

Two years later, but for all who might step over this link while searching for a solution:

The new OAuth2 package for client integration in Symfony2 is the HWIOAuthBundle, the KNPLabs is no longer maintained. - the server pendant is the FOSOAuthServerBundle.

Solution 2

Facebook is using OAuth2, I guess you can easily make a Foursquare bundle based on the FacebookBundle.

Solution 3

Guzzle is a really good client to do http request with objects.

You can add guzzle-oauth2-plugin to handle OAuth easily. There is a tutorial if you need help.

Share:
13,809
Saperlipopette
Author by

Saperlipopette

Updated on June 04, 2022

Comments

  • Saperlipopette
    Saperlipopette almost 2 years

    I'd like to use some APIs, foursquare for example, in my Symfony2 project. The problem is that instead of the 2 great FOS bundles concerning Twitter/Facebook, I'm not finding anything on OAuth (I tried the EtcPasswdOAuthBundle but did not manage to make it work because of a missing file I guess).

    Moreover, I'd like to make it work with FOSUserBundle.

    So, if you could give me some help, I do not understand how to manage OAuth with Symfony ...

    Thanks !

  • Saperlipopette
    Saperlipopette over 12 years
    Yeah I know and I tried to, but I'm a little bit confused with all of the process and how Symfony's authentification core is working ...