agorapulse / grails-facebook-sdk

Facebook SDK Grails Plugin
http://agorapulse.github.com/grails-facebook-sdk/guide
30 stars 13 forks source link

How to set a remember me cookie? #35

Closed confile closed 11 years ago

confile commented 11 years ago

I am using spring security and have the following auth action:

    def auth() {
        if (springSecurityService.isLoggedIn()) {
            redirect uri: SpringSecurityUtils.securityConfig.successHandler.defaultTargetUrl
        }
        else {
            def loginUrl = facebookContext.getLoginURL(
                redirect_uri:createLink(controller:"facebook",action:"success",absolute: true),
                scope: grailsApplication.config.grails.plugin.facebooksdk.appPermissions)

            redirect uri: loginUrl
        }
    }

How can I set the remember me cookie using spring security and your plugin?

benorama commented 11 years ago

Sorry, I'm not familiar with Spring Security. Can't you put the code to set the cookie in facebook controller in success action?

confile commented 11 years ago

How can I do that?

benorama commented 11 years ago

I don't know, I've never used Spring Security ;). You'll have to dig into Spring Security code/docs to check how they generates the cookie...