1

I am trying to integrate Sign In with Apple using the omniauth-apple gem and documentation from omniauth requests to use POST in the link but when i do so, i get the following error

(apple) Authentication failure! ActionController::InvalidAuthenticityToken: ActionController::InvalidAuthenticityToken, ActionController::InvalidAuthenticityToken

this is my code

= link_to 'Sign in via Apple', user_apple_omniauth_authorize_path, method: :post

But i do not get this error when I use GET. It works fine.

How do i make it work with POST?

dbugger
  • 15,868
  • 9
  • 31
  • 33
Kingsley Simon
  • 2,090
  • 5
  • 38
  • 84

1 Answers1

0

Use button_to:

= button_to 'Sign in via Apple', user_apple_omniauth_authorize_path
smathy
  • 26,283
  • 5
  • 48
  • 68