curso-r/auth0

Suggestion: instead of passing around the config_file parameter between functions, define it once when the app initializes

Closed this issue · 2 comments

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

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?