From 7fb7985ec3ae8eeb85f6ede31ef63771494b7f49 Mon Sep 17 00:00:00 2001 From: Patrick J Cherry Date: Thu, 23 Apr 2020 11:05:29 +0100 Subject: [PATCH] Change env var to BYPASS_OAUTH; Fix spellung --- README.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index c461bdc..47bf95c 100644 --- a/README.md +++ b/README.md @@ -45,10 +45,12 @@ use OmniAuth::Builder do ## Bypassing OmniAuth/OAuth -It is also possible to bypass omniauth/ entirely, which can be useful in circumstances where hostnames are dynamic, e.g. in review deployments. To do this add the following code to your OmniAuth initializer. +It is also possible to bypass OmniAuth (and OAuth) **entirely**, which can be useful in circumstances where hostnames are dynamic, e.g. in review deployments. To do this add the following code to your OmniAuth initializer. ```ruby -if ENV.has_key? 'BYPASS_AUTH' # This environment variable can be changed to whatever you like. +# We've usually used an environment variable set outside the app to trigger the +# auth bypass. +if ENV.has_key? 'BYPASS_OAUTH' using RpiAuthBypass OmniAuth.config.enable_rpi_auth_bypass end @@ -65,14 +67,14 @@ If you wish to specify your user's details, you can add the info manually with t OmniAuth.config.add_rpi_mock(uid: '1234', info: {name: 'Example', nickname: 'Ex', email: 'ex@example.com' } ) ``` -All this could also be done inside the `OmniAuth::Bulder` block too. +All this could also be done inside the `OmniAuth::Builder` block too. ```ruby using RpiAuthBypass use OmniAuth::Builder do configure do |c| - if ENV.has_key? 'BYPASS_AUTH' + if ENV.has_key? 'BYPASS_OAUTH' c.enable_rpi_auth_bypass c.add_rpi_mock(uid: 'foo', info: {name: ... } ) end