Open SimonLab opened 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?
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.
Ah... got it. please feel free to PR a change. simplification. :+1:
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