dwyl / hapi-auth-google

:lollipop: Let people authenticate with your application/website using their Google Account (OAuth2)
GNU General Public License v2.0
41 stars 6 forks source link

options for create_oauth2_client #22

Open SimonLab opened 8 years ago

SimonLab commented 8 years ago

The function create_oauth2_client doesn't take anymore the options as a parameter but use instead the global variable OPTIONS. So if I understand correctly when the function create_oauth2_client is called it doesn't need the parameter options

nelsonic commented 8 years ago

@SimonLab good question. As I read it, the current version of this package requires us to pass in options as the first parameter... https://github.com/dwyl/hapi-auth-google/blob/1a02a22988dc6ed805b7635532b7c3d9afc30140/lib/index.js#L42 would there be an advantage to getting all the options from environment variables instead?

SimonLab commented 8 years ago

I think we should keep the options and I also I don't think we should use environment variables inside the plugins because it force the users to defined them. Can we pass these environment variables in the options object?

On my first comment I was just noticing that the call of the oauth2_client function doens't need to take the options parameter because it is not used.

nelsonic commented 8 years ago

Ah... got it. please feel free to PR a change. simplification. :+1: