In OmniAuth/Strategies/Shopify.rb - build_access_token method uses memoization which may cause a potential race condition. Refer to https://bearmetal.eu/theden/how-do-i-know-whether-my-rails-app-is-thread-safe-or-not/
- Supposed thread A has successfully build the token but yet to assign it to the instance variable.
- Thread B access the variable and since it is not yet set, it tries to build the token using same params. This result in error since code can only be used once.
I did have this bug occasionally where I received an error from Shopify. Unfortunately, I could not replicate it.
In OmniAuth/Strategies/Shopify.rb - build_access_token method uses memoization which may cause a potential race condition. Refer to https://bearmetal.eu/theden/how-do-i-know-whether-my-rails-app-is-thread-safe-or-not/
I did have this bug occasionally where I received an error from Shopify. Unfortunately, I could not replicate it.