Using OAuth2 protocol in NGINX R8

Using OAuth2 protocol in NGINX R8

Using OAuth2 protocol in NGINX R8

OAuth2 is a growing protocol used for web application authentication. You may have been using it already and didn't even know it! For example, have you ever opened Spotify, Airbnb, or Etsy and opted to "log in with facebook" instead of using your email? Well, if you click on the facebook button you were using the OAuth authentication protocol so that Spotify, Airbnb, or Etsy could validate the request and pull that data from another database i.e. Facebook.


With the release of NGINX R8, you can use the new OAuth2 protocol to obtain an authentication token, also known as a “bearer token” and present it to a web application which will validate it against that third-party database. The great benefit of this technique is to offload managing that database information which can take up resources and time. NGINX uses an external python script that leverages NGINX http_auth_request module. Unfortunatley this module isn't built by default and will have to be configured manually using the script in the open source folder.

The R8 release has a demo app to play with this feature and to integrate with your staging environments. Note: only Facebook and Google supported in this release For more information on the OAuth2 protocol and how it's used, sign up for NGINX training here.

About the Author

Related Posts you may be interested in: