Suggestion: instead of passing around the config_file parameter between functions, define it once when the app initializes
Closed this issue · 2 comments
daattali commented
Right now, the config file path is being passed around between different functions. It would be better and less error prone to have shinyAuth0App
save the file path that it's given (since that's the only place where the user supplies it initially) in some sort of global variable that all the other functions can then access
jtrecenti commented
I think it is already possible to set the path using options()
, like
options(auth0_config_file = "path/to/_auth0.yml")
the function find_config_file()
tries to get it from there, and you can just leave the config_file
null in all functions, which is the default. Is it enough?
daattali commented
I think it would be much cleaner to not just make it possible, but entirely
remove the option of passing it around internally everywhere. It's ok for
the user to either set it as a config option or pass it to the
`shinyAuth0App()` , but auth0 internally shouldn't be passing this variable
around everywhere - it should just define it once inside shinyAuth0App()
and always use that same value. In my opinion that's a much cleaner design
…---
Dean Attali
President & CEO
AttaliTech Ltd
http://AttaliTech.com <http://attalitech.com>
On Sun, 9 Jun 2019 at 10:27, Julio Trecenti ***@***.***> wrote:
I think it is already possible to set the path using options(), like
options(auth0_config_file = "path/to/_auth0.yml")
the function find_config_file() tries to get it from there. Is it enough?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#25?email_source=notifications&email_token=AAHIQFGH4VRHWYQSWJ6VSXTPZUHNBA5CNFSM4HWBSHB2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXILCWQ#issuecomment-500216154>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAHIQFBA4ZF5XQME5XH2USDPZUHNBANCNFSM4HWBSHBQ>
.