Apple Sign In with Rails App

Trying to troubleshoot a "Nonce Mismatch" error with Apple SIgn In. Not sure if it's an Apple issue, OmniAuth, or perhaps code. Here's some context:

Framework: Rails (v6.1) / Web App

Using the Ruby Gems - [omniauth-apple ], Devise (https://github.com/nhosoya/omniauth-apple)

Everything is "wired" up, and authentication seems to be working. Safari prompts me for my fingerprint, I authenticate, and it redirects back to the web app logged in. Authentication works in all major browsers via a more manual approach. However, I'm receiving this error: Nonce mismatch

From my logs:

ERROR -- omniauth: (apple) Authentication failure! nonce_mismatch: OmniAuth::Strategies::OAuth2::CallbackError, nonce_mismatch | nonce mismatch

One thing I noticed, changing this Rails setting from :lax to :none seems to suppress the error. But the trade-off is Chrome fails. Hmmm...

config.action_dispatch.cookies_same_site_protection = :lax'

Any idea what this means and some guidance would be welcome.

I don't have an answer to this but I'm fighting with it as well / still and it's beyond annoying that Apple can't just apply the tiniest bit of resources to make and maintain Sign In With Apple libraries for Rails / etc

Have you looked at this: https://github.com/nhosoya/omniauth-apple

It has seen a lot of updates in the last few days.

Apple Sign In with Rails App
 
 
Q