# I'm having authentication problems

**URL:** <https://community.weweb.io/t/im-having-authentication-problems/8465>\
**Category:** How do I?\
**Created:** [May 5, 2024, 5:10am UTC](https://community.weweb.io/t/im-having-authentication-problems/8465 "2024-05-05T05:10:47Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![dukemon](https://avatars.discourse-cdn.com/v4/letter/d/5e9695/32.png) [@dukemon](https://community.weweb.io/u/dukemon)\
**Post date:** [May 5, 2024, 5:10am UTC](https://community.weweb.io/t/im-having-authentication-problems/8465/1 "2024-05-05T05:10:47Z")

</div>

So i followed the guide on xano that shows you how to display current user data, but I always get error 401. I’m trying to get the user logged in as themselves but I can currently only seem to show the user whose ID is selected from the collections. The signed in user doesnt show up.

---

<div class="post-metadata">

**Author:** ![Doc](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/doc/32/8594_2.png) [@Doc](https://community.weweb.io/u/Doc)\
**Post date:** [May 9, 2024, 3:59am UTC](https://community.weweb.io/t/im-having-authentication-problems/8465/2 "2024-05-09T03:59:05Z")

</div>

Hello! Thanks for your question.  
Would you be able to provide a short video or screenshot of the error you’re receiving?  
And to verify, have you tried this with test credentials and you’re receiving an error logging in a authenticated user in your application?

Thank you so much!

---

<div class="post-metadata">

**Author:** ![dukemon](https://avatars.discourse-cdn.com/v4/letter/d/5e9695/32.png) [@dukemon](https://community.weweb.io/u/dukemon)\
**Post date:** [May 9, 2024, 1:56pm UTC](https://community.weweb.io/t/im-having-authentication-problems/8465/3 "2024-05-09T13:56:51Z")

</div>

Thats the problem. I can log in with the user, but I have to first select the user on weweb’s side in the collection to get it to show the user’s information. Whenever I try to add the collection like you’re told to from the tutorial on Xano for fetching user info, I keep getting error 401 when I do Auth id. When I don’t, I get error 403 on weweb’s side.

 ![Screenshot 2024-05-09 085711](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/9/953f49d67d8489fcea4d06c37db932189635a3b4.png)  
 ![Screenshot 2024-05-09 085741](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/1/16deb3a6ea53c3df97fbc4ca446ba760b5f9d83f.png)

---

<div class="post-metadata">

**Author:** ![Joyce](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/joyce/32/13232_2.png) [@Joyce](https://community.weweb.io/u/Joyce)\
**Post date:** [May 16, 2024, 12:39pm UTC](https://community.weweb.io/t/im-having-authentication-problems/8465/4 "2024-05-16T12:39:33Z")

</div>

Hi @dukemon 👋

You are trying to fetch data (create a collection) from a Xano endpoint that is protected.

If you try fetching the data without being logged in, you will get a 401 error.

If you try fetching the data with a user who is logged in but doesn’t have the right to access the data, you will get a 403 error.

This visual from Sitechecker may be helpful to better understand:

 ![](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/f/f15c1baf62dbfe3e93d331f739ba44389fe51722.png)  
In your example, it looks like you might be trying to fetch data from an organization (let’s say org A). Assuming you have a pre-condition in Xano that only allows users from org A to fetch data from org 1:

- If you try fetching the data without a user being logged in to your WeWeb app, you will get a 401 error.
- If you try fetching the data from org B when a user from org A is logged in, you will get a 403 error.

Does that help?

---

<div class="post-metadata">

**Author:** ![dukemon](https://avatars.discourse-cdn.com/v4/letter/d/5e9695/32.png) [@dukemon](https://community.weweb.io/u/dukemon)\
**Post date:** [May 17, 2024, 12:24am UTC](https://community.weweb.io/t/im-having-authentication-problems/8465/5 "2024-05-17T00:24:43Z")

</div>

Thank you. But now I’m getting null values from the authenticated user when trying to bind the image to the xano auth user.

 ![Screenshot 2024-05-16 192412](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/b/be4f73ed3c219459d0674a8c08087d26ec14cbeb.png)
