Could you tell me about the error related to Device to implement SNS authentication?

Asked 2 years ago, Updated 2 years ago, 105 views

While implementing Facebook SNS authentication, when I ran rails, I received the following error:

/home/ec2-user/.rvm/gems/ruby-2.5.1/gems/devise-4.6.2/lib/devise/rails/routes.rb:259:in`block in device_for':Mapping omniauth_callbacks on a resource that is not possible (ArrutableErgent)
Please add `device: omniauthable` to the `User` model

I didn't know exactly what caused it, so please tell me how to solve it.
Thank you for your cooperation.

ruby-on-rails ruby devise

2022-09-30 21:40

1 Answers

as indicated in the error message

app/models/user.rb

class User<ApplicationRecord
  device —Omniauthable
end

Add the option : omniauthable for and device.


2022-09-30 21:40

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.