Replies: 2 comments 2 replies
-
Thanks for the detailed report. Any chance you could get the full backtrace for this exception? I have the feeling that it could be related to sessions, because Rails'
I'm happy to hear that 🙂 |
Beta Was this translation helpful? Give feedback.
-
Stacktrace for above error in API only apps without any session middleware
Below where it sets PS: patched the Hash.class_eval do
alias_method :old_brackets, :[]=
def []=(key, value)
binding.irb if key == "rack.session" && value.nil?
old_brackets(key, value)
end
end |
Beta Was this translation helpful? Give feedback.
-
Hey @janko. Thanks this library is great, I admire your work. Initially I already implemented rodauth-rails for authentication on my platform and everything works fine. I’m now adding rodauth-omniauth to make it easier for my users to log in with Google and Facebook.
Everything was going well until a mistake occurred that I cannot identify. I would love for you to help.
My implementation is as follows:
rodauth_main.rb
This is the Frontend and Backend flow
From Frontend I send a POST request hacia http://localhost:3000/auth/google
I receive a URL "https://accounts.google.com/o/oauth2/auth?access_type=offline&client_id=1010492842..."
that I open and accept permission to use my account
redirects to my Frontend http://localhost:8080/callbacks/google?state=..&code=..&scope=..&authuser=..&prompt=..
With these params I send a GET request to http://localhost:3000/auth/google/callback?state=${state}&code=${code}&scope=${scope}&authuser=${authuser}&prompt=${prompt}
The Account and the associated Identity are created in my backend. but an error occurs that causes the Token not to be returned to me. "undefined method 'destroy' for nil:NilClass"
The same happens for login with Facebook.
Beta Was this translation helpful? Give feedback.
All reactions