splix / grails-facebook-authentication-example

Grails 2.0 Spring Security Facebook Plugin Example
12 stars 14 forks source link

when update token have this error #8

Open QtagtechRafael opened 9 years ago

QtagtechRafael commented 9 years ago

[http-bio-8080-exec-3] ERROR facebook.DefaultFacebookAuthDao - Can't update token Message: null Line | Method ->> 27 | toString in com.the6hours.grails.springsecurity.facebook.FacebookAuthToken


| 292 | doCall in com.the6hours.grails.springsecurity.facebook.DefaultFacebookAuthDao$_updateToken_closure9 | 815 | withTransaction . . . in org.grails.datastore.gorm.GormStaticApi | 715 | withTransaction in '' | 271 | updateToken . . . . . in com.the6hours.grails.springsecurity.facebook.DefaultFacebookAuthDao | 85 | authenticate in com.the6hours.grails.springsecurity.facebook.FacebookAuthProvider | 58 | attemptAuthentication in com.the6hours.grails.springsecurity.facebook.FacebookAuthRedirectFilter | 46 | doFilter in '' | 82 | doFilter . . . . . . in grails.plugin.springsecurity.web.authentication.logout.MutableLogoutFilter | 1145 | runWorker in java.util.concurrent.ThreadPoolExecutor | 615 | run . . . . . . . . . in java.util.concurrent.ThreadPoolExecutor$Worker ^ 745 | run in java.lang.Thread

In this part:

if (!equalDates(facebookUser.getProperty('accessTokenExpires') , token.accessToken.expireAt)) { if (token.accessToken.expireAt || !token.accessToken.accessToken) { //allow null only if both expireAt and accessToken are null updated = true facebookUser.setProperty('accessTokenExpires', token.accessToken.expireAt) } else { log.warn("Provided accessToken.expiresAt value is null. Skip update") } } else { log.warn("A new accessToken have same token but different expires: $token") }

digvijay239 commented 9 years ago

I am getting the same error message while using the Facebook login in an application. Have you found a fix for this issue already, please share.

thanks in advance.

john-london commented 9 years ago

I believe these are related to this bug: http://github.com/splix/grails-spring-security-facebook/issues/79. I've created what I believe to be a fix and Igor has said he will review my pull request and hopefully merge this weekend.