# Stuck with User-Auth in Fullstack-App - struggling to find the right approach

**URL:** <https://community.auth0.com/t/stuck-with-user-auth-in-fullstack-app-struggling-to-find-the-right-approach/117519>\
**Category:** Get Help\
**Tags:** apis, application\
**Created:** [October 1, 2023, 4:46pm UTC](https://community.auth0.com/t/stuck-with-user-auth-in-fullstack-app-struggling-to-find-the-right-approach/117519 "2023-10-01T16:46:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![7imon.th](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@7imon.th](https://community.auth0.com/u/7imon.th)\
**Post date:** [October 1, 2023, 4:46pm UTC](https://community.auth0.com/t/stuck-with-user-auth-in-fullstack-app-struggling-to-find-the-right-approach/117519/1 "2023-10-01T16:46:24Z")

</div>

Hey, I’ve tried for a few days now to find the right approach to solving my problem - but just can’t get it right - this is my situation:

- I have a Flutter SPA as frontend (running on Server A), which I want to use to access my backends REST-APIs (running on Server B, Node.js App using express)

- I want to authenticate my user when accessing the backend

What I did so far:

- I followed the [quick start guide](https://auth0.com/docs/quickstart/spa/flutter/01-login) for setting up my Flutter SPA, which works fine, I end up with credentials.AccessToken and credentials.idToken

At this point I don’t understand how I can use these Tokens to make authenticated requests to my backend and how my backend can handle received tokens.  
I’ve already come across the [_Authorization Code Flow with Proof Key for Code Exchange (PKCE)_](https://auth0.com/docs/get-started/authentication-and-authorization-flow/authorization-code-flow-with-proof-key-for-code-exchange-pkce) which seems to be more up to what I’m trying to do. But I can’t really figure out how to apply these steps to my applications architecture. Also it seems that some of theses steps are not applicable to the provided Auth0 Flutter and Express SDKs.

Maybe I am just totally in the wrong direction with my approach here - but I could really need help getting in the right direction here for my setup.

Thanks for your help!

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [October 4, 2023, 6:14pm UTC](https://community.auth0.com/t/stuck-with-user-auth-in-fullstack-app-struggling-to-find-the-right-approach/117519/3 "2023-10-04T18:14:48Z")

</div>

Hi @7imon.th,

Welcome to the Auth0 Community!

> [@7imon.th](#):
>
> At this point I don’t understand how I can use these Tokens to make authenticated requests to my backend and how my backend can handle received tokens.

The access token can be used to access resources from your backend API. Here is an example express API that validates an access token and returns resources.

> **[Auth0 Node (Express) API SDK Quickstarts: Authorization](https://auth0.com/docs/quickstart/backend/nodejs/01-authorization)**
>
> This tutorial demonstrates how to add authorization to an Express.js API.

Let me know if you have any specific questions about it. Thanks!

---

<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:** [October 18, 2023, 6:15pm UTC](https://community.auth0.com/t/stuck-with-user-auth-in-fullstack-app-struggling-to-find-the-right-approach/117519/4 "2023-10-18T18:15:14Z")

</div>

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