# AuthClient return anonymous Identity instead of logged in

**URL:** <https://forum.dfinity.org/t/authclient-return-anonymous-identity-instead-of-logged-in/28921>\
**Category:** JavaScript\
**Created:** [March 26, 2024, 10:01am UTC](https://forum.dfinity.org/t/authclient-return-anonymous-identity-instead-of-logged-in/28921 "2024-03-26T10:01:42Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![marcpp](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/marcpp/32/14921_2.png) [@marcpp](https://forum.dfinity.org/u/marcpp)\
**Post date:** [May 5, 2024, 7:55pm UTC](https://forum.dfinity.org/t/authclient-return-anonymous-identity-instead-of-logged-in/28921/4 "2024-05-05T19:55:44Z")

</div>

Hi,

I’m getting the same issue. When I try to login, a new tab opens and I login with my test internet identity. It then closes the tab and comes back to the tab that I started on, but then nothing: I am **not** authenticated and all I get is this warning log

```auto
WARNING: expected origin 'http://a3shf-5eaaa-aaaaa-qaafa-cai.localhost:4943', got 'http://localhost:3000' (ignoring)

```

N.B: [http://a3shf-5eaaa-aaaaa-qaafa-cai.localhost:4943](http://a3shf-5eaaa-aaaaa-qaafa-cai.localhost:4943) is the frontend of my internet identity canister, whereas [http://localhost:3000](http://localhost:3000) is the frontend canister of my app.

@richards Can I ask how you solved your issue ? (my code looks very much like yours)  
@anon74414410 it’s coming from [this file](https://github.com/dfinity/agent-js/blob/21e8d2bbe37c9221989087ebac1dd52f1154df06/packages/auth-client/src/index.ts#L506) that you wrote. Basically this warning is stopping the authentication request and I’m not sure what it’s trying to prevent 😊 🙏

Thanks!

---

_[View the full topic](https://forum.dfinity.org/t/authclient-return-anonymous-identity-instead-of-logged-in/28921)._
