'Google Omniauth - undefined method bytesize for hash

i am trying to implement google omniauth at my rails 7 app and get the following error:

ERROR -- omniauth: (google_oauth2) Authentication failure! undefined method `bytesize' for #<Hash:...>: NoMethodError, undefined method `bytesize' for #<Hash:...>

Does anyone know how to fix this?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source