Communication between Frontend App, and Node Backend #4358
Unanswered
lcainswebdeveloper
asked this question in
Help
Replies: 1 comment 1 reply
-
Hi, sorry to bump but is anyone able to assist here please? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Question 💬
Hi! Apologies if this is a duplicate, but I haven't been able to find the answer I'm looking for to what is hopefully a straight forward issue to solve.
I'm building an app which has a node js backend, a React/Next front end and a shared mongo database.
Ultimately what I want to do is use NextAuth with the FE code to authenticate a user (currently either by Github or Google), create a user in a users table (which it does), and then on subsequent requests to my back end, pass a means of securely identifying the authenticated user (so that I can log the user id against created articles, categories etc).
The code I have is as below so can someone please help my identify what the best practise would be please for what i'm trying to do? I was hoping to use session.access_token but it continually returns undefined.
Thanks very much :-)
How to reproduce ☕️
Please see code snippet above
Contributing 🙌🏽
Yes, I am willing to help answer this question in a PR
Beta Was this translation helpful? Give feedback.
All reactions