Facebook Omniauth: This authorization code has expired

423 views Asked by At

I first got this error on a callback for my facebook login in rails. I can't remember the rest of it but after that, I can't reproduce it.

I am now getting an error when I do the same login attempt

if user = User.find_from_omniauth(env["omniauth.auth"])

which puts the error on

User.where(auth.slice(:provider, :uid)).limit(1).first

It simply says Node with id 133354 and Neo4j::Session::CypherError in SessionsController#create

Here's some code on the client side authorization which is based off the http://railscasts.com/episodes/360-facebook-authentication

jQuery ->
  $('body').prepend('<div id="fb-root"></div>')

  $.ajax
    url: "#{window.location.protocol}//connect.facebook.net/en_US/all.js"
    dataType: 'script'
    cache: true


window.fbAsyncInit = ->
  FB.init(appId: '<%= ENV["FACEBOOK_KEY"] %>', cookie: true)

  $('#sign_in').click (e) ->
    e.preventDefault()
    FB.login (response) ->
      window.location = '/auth/facebook/callback' if response.authResponse
    , scope: "public_profile,email,user_birthday,user_friends"


  $('#sign_out').click (e) ->
    FB.getLoginStatus (response) ->
      FB.logout() if response.authResponse
    true

  if $('#sign_out').length > 0
    Fb.getLoginStatus (response) ->
      window.location = $('#sign_out').attr("href") if !response.authResponse

Not entirely sure where to start to debug this?

Update: It seems I can't even acesss http://localhost:7474/browser/ When I try to pull up all nodes, it gives me "unknown error". First error has wrecked havoc on the db??

0

There are 0 answers