cloudflare / nginx-google-oauth

Lua module to add Google OAuth to nginx
https://blog.cloudflare.com/
MIT License
429 stars 100 forks source link

fix /_oauth requests if already authenticated and fix for issue #18 #25

Closed danielmotaleite closed 7 years ago

danielmotaleite commented 7 years ago

When nginx receives a request with /_oauth (maybe because of cache or pre-fetch), but the user is already authenticated, the request was "lost". Those requests should be redirected to the final destination.

This also add support for .ngo_whitelist, .ngo_blacklist and ngo_domain. It should fix Issue #18

ps: sorry about the delay, i always have problems squashing my commits :D

bobrik commented 7 years ago

Looks like you have some unrelated changes in this PR.

danielmotaleite commented 7 years ago

The last few lines is the /_oauth fix, the other lines are the fix for issue #18, they required some reorder for the blacklist/whitelist check

i can create 2 pull requests, it was what i wanted to do in the original pull request, but i mess it up :)

bobrik commented 7 years ago

Let's have one PR per issue.