# Could someone clarify what exactly client.isAuthenticated() does?

**URL:** <https://community.auth0.com/t/could-someone-clarify-what-exactly-client-isauthenticated-does/138293>\
**Category:** Get Help\
**Tags:** login-experience, new-universal-login-experience\
**Created:** [July 7, 2024, 1:54pm UTC](https://community.auth0.com/t/could-someone-clarify-what-exactly-client-isauthenticated-does/138293 "2024-07-07T13:54:03Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mhmh33usas](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@mhmh33usas](https://community.auth0.com/u/mhmh33usas)\
**Post date:** [July 7, 2024, 1:54pm UTC](https://community.auth0.com/t/could-someone-clarify-what-exactly-client-isauthenticated-does/138293/1 "2024-07-07T13:54:03Z")

</div>

I’m fairly new to JWTs. I’m trying to understand what happens on the client vs. what happens on the server.

The function `client.isAuthenticated()` is part of the front end SDK. So my quesiton is, how can the front end possibly determine if the user is authenticated - surely that’s something that should be trusted only to the back end, via something like [jose](https://github.com/panva/jose)’s `jwtVerify()`.

Is it simply that the front end can determine (only) that the passed code is “valid” i.e. not expired, but cannot actually determine whether it represents an authenticated user (which is a back end job), or am I way off?

Thank you in advance.

---

<div class="post-metadata">

**Author:** ![ty.frith](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ty.frith/32/58484_2.png) [@ty.frith](https://community.auth0.com/u/ty.frith)\
**Post date:** [July 16, 2024, 9:14pm UTC](https://community.auth0.com/t/could-someone-clarify-what-exactly-client-isauthenticated-does/138293/3 "2024-07-16T21:14:07Z")

</div>

Hey there @mhmh33usas !

> [@mhmh33usas](#):
>
> So my quesiton is, how can the front end possibly determine if the user is authenticated - surely that’s something that should be trusted only to the back end, via something like [jose](https://github.com/panva/jose)’s `jwtVerify()`.

[isAuthenticated](https://github.com/auth0/auth0-spa-js/blob/8653181d23ecea17729da203253d4fa4d17d8ef6/src/Auth0Client.ts#L788) checks if a user has been _authenticated_, not _authorized_ - It does so by checking for a user and thus an ID token. [ID tokens](https://auth0.com/docs/secure/tokens/id-tokens) are returned upon successful authentication. This is common practice on the frontend, whereas validating an access token (authorization) should definitely be handled by the backend.

Hope this helps to clarify!

---

<div class="post-metadata">

**Author:** ![mhmh33usas](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@mhmh33usas](https://community.auth0.com/u/mhmh33usas)\
**Post date:** [July 25, 2024, 7:42pm UTC](https://community.auth0.com/t/could-someone-clarify-what-exactly-client-isauthenticated-does/138293/4 "2024-07-25T19:42:46Z")

</div>

Thank you - I was getting mixed up between authentication and authorisation, which I’ve been using pretty much interchangeably up to this point.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [August 8, 2024, 7:43pm UTC](https://community.auth0.com/t/could-someone-clarify-what-exactly-client-isauthenticated-does/138293/5 "2024-08-08T19:43:05Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
