# Confused with the auth0 setup frontend/backend

**URL:** <https://community.auth0.com/t/confused-with-the-auth0-setup-frontend-backend/151082>\
**Category:** Get Help\
**Tags:** configuration, application\
**Created:** [November 6, 2024, 8:52pm UTC](https://community.auth0.com/t/confused-with-the-auth0-setup-frontend-backend/151082 "2024-11-06T20:52:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![czesuaf](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/czesuaf/32/62005_2.png) [@czesuaf](https://community.auth0.com/u/czesuaf)\
**Post date:** [November 6, 2024, 8:52pm UTC](https://community.auth0.com/t/confused-with-the-auth0-setup-frontend-backend/151082/1 "2024-11-06T20:52:35Z")

</div>

Hey there, i got my app like this:  
-front on react.js  
-next.js backend/routing  
-backend on asp net core.

At first, i configured the react+next part to be where the authentication is handled, but then I discovered it’s not recommended to pass the auth0userId string to the backend on api calls. So I tried adding the authentication somehow on the backend part as well so i can access user claims. But I can’t figure out how to do it. I’m looking at the example solutions and “quickstart” tutorials, but should I be looking for [asp.net](http://asp.net) core ones, or keep the react+next part and add something on the [asp.net](http://asp.net) core part? What should be the correct flow there?

---

<div class="post-metadata">

**Author:** ![dawid.matuszczyk](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dawid.matuszczyk/32/74550_2.png) [@dawid.matuszczyk](https://community.auth0.com/u/dawid.matuszczyk)\
**Post date:** [November 30, 2024, 6:11pm UTC](https://community.auth0.com/t/confused-with-the-auth0-setup-frontend-backend/151082/3 "2024-11-30T18:11:24Z")

</div>

Hi @czesuaf

Welcome to the Auth0 Community!

Thank you for posting your question. I think you are on the right track. I’m leaving a few links so you can better understand the topic.

> The SPA interacts with the authorization server to get the ID, access, and refresh tokens. Then, the SPA uses the ID token to get data about the user, the access token to call an API, and the refresh token to get a new access token once it expires.

> **[The Backend for Frontend Pattern (BFF)](https://auth0.com/blog/the-backend-for-frontend-pattern-bff/)**
>
> Learn how to keep tokens more secure by using the Backend for Frontend (BFF) architectural pattern.

> **[Backend For Frontend Authentication Pattern with Auth0 and ASP.NET Core](https://auth0.com/blog/backend-for-frontend-pattern-with-auth0-and-dotnet/)**
>
> Understand the Backend For Frontend authentication pattern and how it can be implemented in ASP.NET with Auth0.

> [@General workflow for Auth0 with a seperated frontend + backend not clear](https://community.auth0.com/t/general-workflow-for-auth0-with-a-seperated-frontend-backend-not-clear/85346/2):
>
> I have the exact same question, besides the fact that I’m using Flutter and Ktor instead. Did you manage to understand how to implement oauth in your project?

> [@Frontend or backend authentication?](https://community.auth0.com/t/frontend-or-backend-authentication/48515):
>
> Hello, I want to start working on an application for my personal portofolio, and I found out abut Auth0 being a good authentication system. But I got a little bit confused about what should I use and how. Maybe someone can help me, I would be really grateful. I want to create a web application that has React as frontend and Python with Django as backend. Most of the processing of the data will be done on the backend but I am confused about what type of authentication I should use. Should I do…

Thanks  
Dawid

---

<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:** [December 14, 2024, 6:11pm UTC](https://community.auth0.com/t/confused-with-the-auth0-setup-frontend-backend/151082/4 "2024-12-14T18:11:57Z")

</div>

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