Reputation: 95
I am trying to add to the Rails API the ability to handle social signins through the mobile application, and while adding omniauth, I am having an issue with my JWT and devise that has already been setup and working. This is triggering the following error:
unexpected ',', expecting => (SyntaxError)
:omniauthable, omniauth_providers: [:google...
This error occurs only when both methods are present, but both independently work fine.
Any ideas or suggestions would be greatly appreciated.
Upvotes: 1
Views: 304
Reputation: 95
To solve this error I split the devise method into two, adding the omniauthable and omniauth_providers into another call.
devise :database_authenticatable, :registerable,
:recoverable, :rememberable, :validatable,
:jwt_authenticatable, jwt_revocation_strategy: self
devise :omniauthable, omniauth_providers: [:google_oauth2]
Upvotes: 3