Xano auth not working

Hi there!

I am using the Xano Authentication to log my user in. There is no issue at all on the weweb editor but for some weird reason, I can log in when I test it on the staging environment neither can I do it on production.

Here is my workflow on my log in page:

  1. user provides credentials
  2. Xano plug in authenticate my user
  3. I then have a split to redirect my users to the right page (I have 3 different user types)

On staging (or production), I can see that the requests to Xano are correctly done and the responses on Xano are all 200 responses but for some weird reason the redirection to my page does not happen I can’t even log in

I am in the same boat.

here’s a video of my experience

Mmmm that’s weird… @Gauthier1, @jaredgibb, would you mind sending me a DM with the editor links to your projects so I can have a closer look?

UPDATE: I was able to reproduce the bug on my side. A bug ticket is open with the tech team. It’s high priority and will be looked at asap.

1 Like

while it was not working during my video grab, it is working now. :man_shrugging:

consider my query solved

1 Like

Good to know. Thanks for the update!

Is there anything you remember changing in your project in the meantime? Even something that seems unrelated might help. No worries if nothing comes to mind! We’ll keep investigating anyway :slight_smile:

Well for me the issue is still there. I’m not able to log in at all. The issue is not in the editor though, it’s when I try to test my log in on staging or prod. See attached.

ezgif-4-9d97b247e8

1 Like

Yes, the bug is still open. The tech team is looking into it. If you want to send me a link to your project in a direct message, I’ll add it to the bug ticket to give additional context to the devs.

Hi again :wave:

My bad, this wasn’t a bug, I just made the same mistake as you @Gauthier1 when trying to reproduce it :sweat_smile:

So the issue is related to the “Role key” configured in the Xano plugin:

In the screenshot above, it’s role but the role is actually in the _role variable returned by Xano:

So you have two options:

  • rename the variable in Xano, or
  • define the Role key as _role in WeWeb
2 Likes

Thank you @Joyce for the help, it’s fixed. I think I wouldn’t have found this :pray: :pray: as it is working as expected in the Editor

2 Likes

Yeah, great point!

We make it work in the editor to help you build without blockers but it comes with this type of downsides. The product team is aware but we haven’t quite found the perfect approach yet. Work in progress! :slightly_smiling_face:

3 Likes

Hi @Joyce,

Unfortunately it seems I’m having the same issue. The role key looks fine however, along with all the access configurations:

I tried setting up a new page with the Xano Auth component, same issue. Would you have any further insights or should I create a ticket with the team?

Other thing to note is that it works just fine in the editor, but not on the published app.

This is fixed for me as of today. Not sure if something was changed on Weweb’s end, but simply publishing the app once again resolved it (while yesterday it didn’t).

Thanks :slight_smile:

Actually this is still an issue, at least it is as soon as we try to scope access on specific rôles. I’ll create a ticket.

Hi, I looked at your project, it seem you’re using groups with multiple roles but your users can only have one role because its a type text column. Our group use an AND logic, it mean your user need to have every roles included in the group to match it.

To have a OR logic you have to create a different group for every role (yes it can seem redundant) and apply multiple groups in the page, the different groups will be handled with a OR logic at the page level.

Tell me if it help you to fix your issue, because I was not able to reproduce it on my side.

Hi Alexis, thanks for your reply. Keeping it to one role per group does indeed solve the issue. For some reason I hadn’t noticed the And operator in the group config.

As you point out, it does feel redundant in certain structures of permissions. Do you plan on supporting an Or operator as well?

Not planned for now as the current system allow you to implement both logic and never was a blocker for anyone, but yeah in a long term it could be improved so you can choose the logic you want on the group :slight_smile: (And even use multiple user attributes and conditions to compose your own rules :bulb:)

Thanks for the quick reply Alexis. This is noted and we’ll simply adjust the approach from the DB side in the future.