Skip to content

Instantly share code, notes, and snippets.

I have managed to install this… and make it work. I implemented it for Facebook and Google, but you can extend it. My solution it is mostly as described in #116, with a bit of more code presented. The key aspects that lack in the #116 presentation (IMO) are:

  • the registration as service of your custom FOSUBUserProvider (with the necessary parameters)
  • set the service for oauth_user_provider in the security.yml with your custom created service

Here are the steps:

  1. Routing. In routing.yml I have added all the routes for both bundles.
  2. Configuration. I have set the config.yml mostly as it is presented in the HWIOAuthBundle.
  3. Security. I have set the security.yml mostly as it is presented in the HWIOAuthBundle (though my routes are using /login pattern, not /connect). Also, the oauth_user_provider is set for my custom service.
@mathewpeterson
mathewpeterson / hack.sh
Created March 31, 2012 12:13 — forked from erikh/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
@mathewpeterson
mathewpeterson / fubot-init.sh
Created February 12, 2012 01:51 — forked from philchristensen/fubot-init.sh
hubot init script
#! /bin/sh
PATH=/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/opt/fubot/bin/hubot
NAME=fubot
DESC="Jabber Bot"
CONF="-a xmpp --name $NAME"
BOT_USER=fubot
BOT_GROUP=fubot
@mathewpeterson
mathewpeterson / gitconfig
Created October 27, 2011 19:55
useful gitconfig settings
[alias]
update = !git fetch origin && git rebase origin/master
add-all = !git add -A && git status
done = !git fetch && git rebase origin/master && git checkout master && git merge @{-1} && git push
lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative
ir = !git rebase -i origin/master
unstage = reset HEAD
log-branch = log origin/master..
undo-commit = reset --soft HEAD^
branch-name = !git for-each-ref --format='%(refname:short)' `git symbolic-ref HEAD`
@mathewpeterson
mathewpeterson / gitconfig
Created October 27, 2011 16:45
useful gitconfig settings
[alias]
update = !git fetch origin && git rebase origin/master
addall = !git add -A && git status
done = !git fetch && git rebase origin/master && git checkout master && git merge @{-1} && git push
lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative
ir = !git rebase -i origin/master
unstage = reset HEAD
[color]
ui = auto