-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request: a way to not load the UI until after logging in #5
Comments
I agree with @daatalli, authentication in UI would be great. Is there any workround for this problem @JohnCoene. |
Yes indeed, it does get tedious. It could be done but it's quite a bit of work. There are two ways I can think of doing this: by hijacking the Then either upon login load the shiny UI via websocket (can't return another response), or from the UI screen exectute a The first is likely to cause issues with the rendering of some things as the UI is not meant to be loaded like that (e.g.: dependencies), the second is rather convoluted as it feels like we're logging people in twice. There might be an easier way but I'm not seeing it. Currently, using modules it's possible to reduce the use observeEvent(f$req_sign_in(), {
callModule(module_name_server, "module_name")
}) |
Here's a potential workaround: build your The toy example below works for me: the text "Logged in!" doesn't show up in the html (as inspected using Chrome's dev panel) until you log in. I haven't tested it with a full app, but it worked okay with some buttons and other inputs and outputs. Here's a screenshot showing the empty div "logged_in_ui" using this method: Using This is a very minimal example, so maybe there are disadvantages in more complex cases--@JohnCoene, are there any obvious reasons this is a bad idea?
I'm posting here since there's been more discussion, but it's mostly a duplicate of this issue. |
@chris31415926535 Thank you for the solution above. I am trying to extend it with using a modal dialog. It works nicely for sign in but when signed out, It does not show the firebaseUI again. I'll appreciate any advice.
|
I'm not sure how, or if it's possible, but the current way of requiring all content to use either
f$req_sign_in()
orreqSignin()
seems like it would get tedious and very verbose very fast. It would be good to have bypass that, like how RStudio's authentication and {auth0} really don't load the UI until it's safe to do soThe text was updated successfully, but these errors were encountered: