# How does my application know that a user has been authenticated by auth0?

**URL:** <https://community.auth0.com/t/how-does-my-application-know-that-a-user-has-been-authenticated-by-auth0/120468>\
**Category:** Get Help\
**Tags:** login-prompt-new-experience, login-experience\
**Created:** [November 8, 2023, 12:08pm UTC](https://community.auth0.com/t/how-does-my-application-know-that-a-user-has-been-authenticated-by-auth0/120468 "2023-11-08T12:08:34Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![salim.mahat](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/salim.mahat/32/51177_2.png) [@salim.mahat](https://community.auth0.com/u/salim.mahat)\
**Post date:** [November 8, 2023, 12:08pm UTC](https://community.auth0.com/t/how-does-my-application-know-that-a-user-has-been-authenticated-by-auth0/120468/1 "2023-11-08T12:08:34Z")

</div>

I’d like to utilise an auth0 login in login, and I’m accessing my backend APIs to do some logic in it. My concern is, how does my backend know that the user is authorised by auth0 when I use my APIs?

---

<div class="post-metadata">

**Author:** ![rueben.tiow](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rueben.tiow/32/11646_2.png) [@rueben.tiow](https://community.auth0.com/u/rueben.tiow)\
**Post date:** [November 9, 2023, 12:04am UTC](https://community.auth0.com/t/how-does-my-application-know-that-a-user-has-been-authenticated-by-auth0/120468/3 "2023-11-09T00:04:03Z")

</div>

Hi @salim.mahat,

Welcome to the Auth0 Community!

You can determine what the user is authorized for by checking the access token for the `aud` (audience) claim. The audience refers to the API that the authorized user is for. Also, when you make a request to the login endpoint (`/authorize`), there is an audience query parameter that also indicates which API the user is authenticating against.

I hope this helps!

Thanks,  
Rueben

---

<div class="post-metadata">

**Author:** ![salim.mahat](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/salim.mahat/32/51177_2.png) [@salim.mahat](https://community.auth0.com/u/salim.mahat)\
**Post date:** [November 9, 2023, 9:40am UTC](https://community.auth0.com/t/how-does-my-application-know-that-a-user-has-been-authenticated-by-auth0/120468/4 "2023-11-09T09:40:46Z")

</div>

Thanks for your helpful response. I’d like to integrate my product with auth0 and use auth 0 login. After logging in and calling api from my backend in that login flow, my question is how does my backend know if the user is authorised or not?

---

<div class="post-metadata">

**Author:** ![rueben.tiow](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rueben.tiow/32/11646_2.png) [@rueben.tiow](https://community.auth0.com/u/rueben.tiow)\
**Post date:** [November 16, 2023, 10:12pm UTC](https://community.auth0.com/t/how-does-my-application-know-that-a-user-has-been-authenticated-by-auth0/120468/5 "2023-11-16T22:12:57Z")

</div>

Hi @salim.mahat,

Thanks for the reply.

> [@salim.mahat](#):
>
> how does my backend know if the user is authorised or not?

You can achieve this by validating the access token issued to the user. Simply check if the user has the necessary scopes to access your API.

For more details, please check out our [Validate Access Tokens](https://auth0.com/docs/secure/tokens/access-tokens/validate-access-tokens) documentation.

Thanks,  
Rueben

---

<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:** [November 30, 2023, 10:13pm UTC](https://community.auth0.com/t/how-does-my-application-know-that-a-user-has-been-authenticated-by-auth0/120468/6 "2023-11-30T22:13:05Z")

</div>

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