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
I'm looking for a redirect function without a button initiating the event.
What are my options?8 Replies
Take a look at #456, the method mentioned by the OP could work for you, since you'd use an internal route, rather than an external site
jpmanson
<:issue_open:882464248951877682> [widgetti/solara] Navigate to URL
I didn't find any way to navigate an external URL directly from the app. Something like for example:
solara.use_router().push('https://www.google.com')
Although you can create HTML buttons or links to go to other pages, they require a click from the user.
It would be very nice if this "navigate to URL" possibility could be added.
ThanksCreated
Thank you for this. Im uncertain what a
component vue
is just yet. What would that look like? Would I render a component that runs ?For instance, yeah
A
component_vue
let's you define a custom solara component based on a vue template, so you can control anything on the front-endTake a look at the docs page for it: https://solara.dev/examples/general/vue_component
taking a look
if I specify a window redirect in a vue component, would it only do it for the component? Or can it redirect the page for the entire application?
It should redirect the browser completely, although
solara.use_router().push()
will use solara to load the new page as if the user had navigated to itI like this answer as it doesn't require knowledge of vue and is fully python. I'll give it a try. Thanks for your help.