(苹果)认证失败! ActionController::InvalidAuthenticityToken

问题描述 投票:0回答:1

我正在尝试使用omniauth-apple gem和omniauth请求的文档与Apple集成登录以在链接中使用POST,但是当我这样做时,我收到以下错误

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

这是我的代码

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

但是当我使用

GET
时我没有收到此错误。效果很好。

如何使其与 POST 一起使用?

ruby-on-rails single-sign-on omniauth apple-sso omniauth-apple
1个回答
0
投票

使用

button_to

= button_to 'Sign in via Apple', user_apple_omniauth_authorize_path
最新问题
© www.soinside.com 2019 - 2024. All rights reserved.