Help! Auth0 (Xano + WeWeb) Authentication Issue

Hello,

I’m trying to configure Auth0 for my application, Xano is my backend. I’ve configured Auth0 in both Xano and in Weweb and confirmed they are working independently. What does not appear to be working is that WeWeb is not able to authenticate to Xano, to access locked tables, etc.

I’ve included a detailed screenshot here, does anyone have any idea on what I might be doing wrong?

1 Like

Hi @patopt

The Xano plugin don’t use the access token of Auth0, that’s why it’s not working. You can use our plugin REST API and use the token from Auth0

1 Like

Thanks Mael. Do you have any more instruction on the steps to actually implement this?

Unfortunately I never did it, I have no instruction to give you, sorry

I found this tutorial if that can help you: Auth0 - YouTube

1 Like

Little tutorial to do what you want:

  1. Create a login page with a button. Add a workflow on the button to call /oauth/auth0/init (from auth0 plugin in xano)

  1. Create a empty page on weweb that you call redirect uri . Add a workflow at page load that calls oauth/auth0/continue . Then you need to save the token with a custom line of javascript before fetching the user and redirecting to the page you want. (modifié)

2 Likes

Thanks Mael, let me give this a shot.

Hi Mael,

A few questions here to fill in a couple of missing steps.

  1. On the Sign In page, I am calling the INIT endpoint and getting back the REDIRECT_URL- Good!

  2. Once I call the REDIRECT URL, what should I do? I’m guessing I should redirect to that page, but I’m getting an error in Weweb so guessing something not correct there, placing the URL in browser direclty does work…

Here is the URL loading fine when I just paste it into the browser

  1. Once i get the sign in page working (Step 2) - How do I go about storing the CODE that Auth0 returns so that I can run the CONTINUE API to authenticate the user? I’m guessing this is returned from the authentication process, but just not sure how that would work yet because I can’t get to calling CONTINUE just yet…

Thank you for your help here!

@Mael Just wanted to see if you had any update on this?

@Mael Any update here?

Hey @patopt To extract the query param from page url, You just need to create a variable name “code” in this case and set the the type as query, it will auto extract the code from page url