Open mahboob-hussain opened 2 years ago
This does seem pretty weird. It's as if OneLogin redirected back to your logout path. How did you log out? Was there a button in your application?
We see similar:
NoMethodError: undefined method `username' for nil:NilClass
devise_saml_authenticatable (1.9.1) lib/devise_saml_authenticatable.rb:152:in `public_send'
devise_saml_authenticatable (1.9.1) lib/devise_saml_authenticatable.rb:152:in `block in <module:Devise>'
devise_saml_authenticatable (1.9.1) app/controllers/devise/saml_sessions_controller.rb:57:in `store_info_for_sp_initiated_logout'
activesupport (6.0.6.1) lib/active_support/callbacks.rb:428:in `block in make_lambda'
Simplest fix is likely just return if current_user.nil?
I am using devise_saml_authenticatable to authenticate users with OneLogin as the idp. I am getting an error, undefined method 'email' for nil:Nil class after the sign_out request is repeated.
The sign_out sequence is:
In my model User, the included devise modules are:
The devise saml configuration I have is ==> Configuration for :saml_authenticatable
I do not have any logout route specified in routes.rb.