我是 Rails 和 Microsoft Graph/Omniauth 等的完全新手,并且有点卡住了。
我已经按照Microsoft Graph 教程逐字逐句地遵循了https://docs.microsoft.com/en-us/graph/tutorials/ruby Build Ruby on Rails 应用程序。在添加 Azure AD 身份验证实现登录,我开始启动服务器应该重定向到https://login.microsoftonline.com我得到:
OmniAuth::AuthenticityError Forbidden.
当显示上述错误时,我没有被定向到登录我的 URL 是:http://localhost:3000/auth/microsoft_graph_auth。
我正在运行 Ruby 2.7。而不是 2.6.6(如文档中所述)。
有没有人有任何指示和/或建议?
提前致谢!
Application Trace | Framework Trace | Full Trace
omniauth (2.0.1) lib/omniauth/authenticity_token_protection.rb:27:in `deny'
rack-protection (2.1.0) lib/rack/protection/base.rb:54:in `react'
omniauth (2.0.1) lib/omniauth/authenticity_token_protection.rb:18:in `call!'
omniauth (2.0.1) lib/omniauth/authenticity_token_protection.rb:11:in `call'
omniauth (2.0.1) lib/omniauth/strategy.rb:236:in `request_call'
omniauth (2.0.1) lib/omniauth/strategy.rb:192:in `call!'
omniauth (2.0.1) lib/omniauth/strategy.rb:169:in `call'
omniauth (2.0.1) lib/omniauth/builder.rb:45:in `call'
rack (2.2.3) lib/rack/tempfile_reaper.rb:15:in `call'
rack (2.2.3) lib/rack/etag.rb:27:in `call'
rack …Run Code Online (Sandbox Code Playgroud)