conic
conic
SSolara
Created by conic on 2/19/2024 in #questions-issues
Help: Auth Redirect to a new page
I'd like for my application to start on the auth0 login url rather than a solara page if the user is not authenticated. The example for solara auth involves a Button redirect to the login_url
@solara.component
def Page():
if not auth.user.value:
solara.Button("Login", icon_name="mdi-login", href=auth.get_login_url())
@solara.component
def Page():
if not auth.user.value:
solara.Button("Login", icon_name="mdi-login", href=auth.get_login_url())
I'm looking for a redirect function without a button initiating the event.
@solara.component
def Page():
if not auth.user.value:
redirect_to(href=auth.get_login_url())
@solara.component
def Page():
if not auth.user.value:
redirect_to(href=auth.get_login_url())
What are my options?
11 replies
SSolara
Created by conic on 2/16/2024 in #questions-issues
Help: Drawing a rectangle on an ipyleaflet map
Trying to create an ipyleaflet component but the state and view management is a bit over my head. Does anyone have experience in creating a component that updates a "bounding_boxes" reactive element?
59 replies
SSolara
Created by conic on 1/23/2024 in #questions-issues
AWS Cognito Auth?
My team uses this. Doesn't work by default with solara auth. Despite cognitos support for oauth2 and OIDC/etc. Can this be a configuration issue with cognito? Or is there something that Im overlooking.
3 replies
SSolara
Created by conic on 1/17/2024 in #questions-issues
Cookies?
No description
3 replies
SSolara
Created by conic on 1/16/2024 in #questions-issues
production flag throws error
I run into some error where running --production solara run demo_main.py --production
python

Exception in thread Thread-1 (_track):
Traceback (most recent call last):
File "/home/ubuntu/.pyenv/versions/3.11.5/lib/python3.11/threading.py", line 1038, in _bootstrap_inner
self.run()
File "/home/ubuntu/.cache/pypoetry/virtualenvs/my-project-jKnIrI3z-py3.11/lib/python3.11/site-packages/solara/server/patch.py", line 258, in Thread_debug_run
if self.current_context:
^^^^^^^^^^^^^^^^^^^^
AttributeError: 'Thread' object has no attribute 'current_context'
python

Exception in thread Thread-1 (_track):
Traceback (most recent call last):
File "/home/ubuntu/.pyenv/versions/3.11.5/lib/python3.11/threading.py", line 1038, in _bootstrap_inner
self.run()
File "/home/ubuntu/.cache/pypoetry/virtualenvs/my-project-jKnIrI3z-py3.11/lib/python3.11/site-packages/solara/server/patch.py", line 258, in Thread_debug_run
if self.current_context:
^^^^^^^^^^^^^^^^^^^^
AttributeError: 'Thread' object has no attribute 'current_context'
doing a regular solara run demo_main.py seems to work, but production seems to crash everything.
4 replies