Note that there are some explanatory texts on larger screens.

plurals
  1. POGrails Spring security facebook plugin sample FacebookAuthDAOImpl
    primarykey
    data
    text
    <p>I started looking at <a href="http://grails.org/plugin/spring-security-facebook" rel="nofollow">this plugin</a> for facebook integration in grails 2.0 apps. I ran through he setup instructions listed and got a sample app working....for the most part.</p> <p>I'm having problems fleshing out <code>FacebookAuthDaoImpl</code> which implements the interface <code>FacebookAuthDao</code>. Now I know this class is supposed to be configured to match the apps domain structure, but for a sample app with no out-of-the-ordinary domain settings what would be an appropraite implementation of this interface?</p> <p>What I'm trying to achieve is when a facebook user is created, a spring security user should also be created and they both be associated.</p> <p>Edit:</p> <p>After running <code>s2-init-facebook</code> and getting the generated <code>FacebookAuthDaoImpl</code>. I executed <code>run-app</code> and then I get an error roles in <code>getRoles()</code> of the generated impl.</p> <pre><code>No such property: roles for class: com.gotomanners.auth.FacebookUser </code></pre> <p>I fixed this by adding </p> <pre><code>roles = [new GrantedAuthorityImpl('ROLE_USER'), new GrantedAuthorityImpl('ROLE_FACEBOOK')] </code></pre> <p>The app starts fine now and I can click the fbConnect button which connects to facebook fine but on returning to the app there is no facebookUser or regular user in the DB .... which is why I went on to look at using <code>createAppUser()</code> from <code>DefaultConnectedFacebookAuthDaoImpl</code></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload