Punxsutawney
Punxsutawney
SSolara
Created by Punxsutawney on 10/6/2024 in #questions-issues
Authorization example using a Thread/Task is even possible?
I see, of course, I do re-redefine it!, thanks for pointing it out. The funny thing is that I use task for other activities and so far everything works pretty well. I even tried some other approaches here using use_task also but I had trouble to activate the task just using the button click, never did this before, I tried making it dependant on a use_reactive variable than was set by the button, but things got a bit messy very quickly and it was not working well....
8 replies
SSolara
Created by Punxsutawney on 10/6/2024 in #questions-issues
Authorization example using a Thread/Task is even possible?
It works now!. Thanks a lot! I see what is different, not sure I understand why it matters so much.
My code differs in that I changed the lambda call to the the global @task decorated task function for a local @task decorated function call because I wanted to do more things locally using the local context... (I'm not using async/coroutines in my code but your approach works now for my code also) .. This was my NOT working code, the rest is like the original: @solara.component def LoginForm(): username = solara.use_reactive("admin") password = solara.use_reactive("admin") @solara.lab.task def check_credentials(): print('check_credentials - enter') return login(username.value, password.value) with solara.Card("Login"): solara.Markdown( """ This is an example login form.
use admin/admin to login as admin. use test/test to login as a normal user.""") solara.InputText(label="Username", value=username) solara.InputText(label="Password", password=True, value=password) solara.Button(label="Login", on_click=check_credentials, disabled=check_credentials.pending) solara.ProgressLinear(check_credentials.pending) if check_credentials.value: solara.Error("Wrong username or password")
8 replies
SSolara
Created by yois004 on 7/5/2024 in #questions-issues
Ipyaggrid Grid element - Get selected row if click on it
Could you describe what you want to do exactly? what have you tried so far and is not working?
2 replies
SSolara
Created by Punxsutawney on 5/9/2024 in #questions-issues
Issue. MismatchingStateError with Auth0 in Solara Auth Sample on AWS EC2
Sorry, not sure I'm understanding you, I'm not using the server ip address in any scenario. I'm accesing to the server where Solara is running using the Cloudflare tunnel, a public url, that in all different cases I tried (a Windows desktop, a macOS, a Raspberry PI and the AWS EC2 server) is mapped to http://localhost and the problem appears when using at the same time Auth0 for the authentication. On AWS I tried 2 different AMIs, the standard AWS (I think it's readhat based) one and an UBUNTU, thinking that perhaps Cloudflare's client was doing something funny there, but in both cases I had the same result... don't know perhaps Cloudflare is doing some "magic" for AWS infra?
9 replies
SSolara
Created by Punxsutawney on 5/9/2024 in #questions-issues
Issue. MismatchingStateError with Auth0 in Solara Auth Sample on AWS EC2
Yes, right now I can access to the AWS server using SOLARA_SESSION_HTTPS_ONLY=False, and using the same Cloudflare tunnel I've been using, I use https to connect to the tunneled domain (I suppose this is just the proxy part), the mapping of the tunnel always has been for http://localhost. In the other computers I have installed the application I was using SOLARA_SESSION_HTTPS_ONLY=True with the same Cloudflare and Auth0 configuration and it worked fine. The only change I can "see" is AWS infra ... in this conditions if I change SOLARA_SESSION_HTTPS_ONLY=True then Auth stops working for the AWS host.
9 replies
SSolara
Created by Punxsutawney on 5/9/2024 in #questions-issues
Issue. MismatchingStateError with Auth0 in Solara Auth Sample on AWS EC2
Yes! that's it, it works now!!! I can confirm it works also using a Cloudflare tunnel, thank you!. Cloudflare adds the https on top so this is why I thought it was necessary to set SOLARA_SESSION_HTTPS_ONLY to True BTW, what could be the explanation for it working in the other environments I tried, same configuration, same Cloudflare tunnel, but not on AWS?
9 replies
SSolara
Created by Punxsutawney on 5/4/2024 in #questions-issues
Issue with Event Handling in Solara Integration with Auth0 on Inactivity
Makes sense, thank you!, I will tell you if I can reproduce it.
8 replies
SSolara
Created by Punxsutawney on 5/4/2024 in #questions-issues
Issue with Event Handling in Solara Integration with Auth0 on Inactivity
I could leave a local server instance + local Auth0 authenticated browser open (no cloudflare) to see if I can reproduce the problem.
8 replies
SSolara
Created by Punxsutawney on 5/4/2024 in #questions-issues
Issue with Event Handling in Solara Integration with Auth0 on Inactivity
Good point, I'm using a Cloudflare tunnel, could it be related to this?
8 replies
SSolara
Created by Punxsutawney on 5/4/2024 in #questions-issues
Issue with Event Handling in Solara Integration with Auth0 on Inactivity
Any way to detect user inactivity or server timeout or similar things from Solara side? if there is some event or reactive element I could attach to then I suppose I could redirect to the Auth0 logout url, right?
8 replies