zquestz / omniauth-google-oauth2

Oauth2 strategy for Google
1.45k stars 413 forks source link

unless headers[CACHE_CONTROL] error in a Rails app when permissions declined #416

Closed berserkia closed 2 years ago

berserkia commented 2 years ago

Appears to be the same issue noted here https://github.com/rack/rack/issues/1698, where omniauth is rescuing the exception but returning the headers as nil instead of an enumerable and violiating the rack spec. Specifically seems to be an issue per this commenter of going from omniauth 1 to 2 https://github.com/rack/rack/issues/1698#issuecomment-983027184

Not sure if this can be resolved via this google auth package or must be solved on omniauth's end. For context, my relevant version numbers with Rails 6.0.3:

omniauth (2.0.4)
      hashie (>= 3.4.6)
      rack (>= 1.6.2, < 3)
      rack-protection
    omniauth-google-oauth2 (1.0.0)
      jwt (>= 2.0)
      oauth2 (~> 1.1)
      omniauth (~> 2.0)
      omniauth-oauth2 (~> 1.7.1)
    omniauth-oauth2 (1.7.2)
      oauth2 (~> 1.4)
      omniauth (>= 1.9, < 3)
zquestz commented 2 years ago

Unfortunately this has to be fixed on the omniauth side. =\