Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gimler/sfoauthplugin
Login with facebook, google or another oauth provider
https://github.com/gimler/sfoauthplugin
Last synced: 6 days ago
JSON representation
Login with facebook, google or another oauth provider
- Host: GitHub
- URL: https://github.com/gimler/sfoauthplugin
- Owner: gimler
- Created: 2010-08-26T11:50:05.000Z (about 14 years ago)
- Default Branch: master
- Last Pushed: 2010-08-26T14:51:06.000Z (about 14 years ago)
- Last Synced: 2023-03-11T02:52:57.325Z (over 1 year ago)
- Language: PHP
- Homepage:
- Size: 88.9 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README
Awesome Lists containing this project
README
# sfOAuth plugin #
The `sfOAuthPlugin` is a symfony plugin that provides authentication and
authorization features over oauth for `sfDoctrineGuardPlugin`.## Installation ##
This plugin requires oauth pecl extension for oauth 1.0. The propel version is not implemented yet.
* Install the plugin (via a package)
symfony plugin:install sfOAuthPlugin
* Install the plugin (via a Subversion checkout)
svn co http//svn.symfony-project.com/plugins/sfOAuthPlugin/branch/1.4 plugins/sfOAuthPlugin* Activate the plugin in the `config/ProjectConfiguration.class.php`
[php]
class ProjectConfiguration extends sfProjectConfiguration
{
public function setup()
{
$this->enablePlugins(array(
'sfDoctrinePlugin',
'sfDoctrineGuardPlugin',
'sfOAuthPlugin',
'...'
));
}
}* Enable one or more modules in your `settings.yml` (optional)
all:
.settings:
enabled_modules: [default, sfAuth, sfOAuth]* Add oauth provider configuration in your `app.yml`
all:
sf_oauth_plugin:
enabled: true
provider:
facebook:
enabled: true
protocol: 2
consumer_key: xxxxxxxxxxxxxxx
consumer_secret: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
scope: email
authorize_url: https://graph.facebook.com/oauth/authorize
access_url: https://graph.facebook.com/oauth/access_token
profile_url: https://graph.facebook.com/me
google:
enabled: true
protocol: 1
consumer_key: anonymous
consumer_secret: anonymous
scope: https://www.googleapis.com/auth/userinfo#email
request_url: https://www.google.com/accounts/OAuthGetRequestToken
authorize_url: https://www.google.com/accounts/OAuthAuthorizeToken
access_url: https://www.google.com/accounts/OAuthGetAccessToken
email_url: https://www.googleapis.com/userinfo/email* Clear you cache
symfony cc