'NestJS + Angular + Discord authentication

I'm working on a new project that will be a website for friends and me. I chose to use discord Oauth2 to handle the authentication of my website. My backend will be developped using NestJs, and the frontend will be based on angular as it's the framework I know the most.

I followed this video to setup discord Oauth in my nestJs project, but now, I'm wondering how to link my nestJs session to my angular frontend, but didn't find anything on the subject. Maybe wrong keywords, but still didn't find. Any advice is welcome. Anyone has an idea ?

Trying to rephrase as asked in comment:

I currently have:

  • An almost empty NestJs project for my website's backend. It is plugged to discord OAuth as guided in the video above

  • An almost empty angular project for my website's frontend.

When logged to the api (nestjs) with discord, there is a session saved with user's info. I would like to get these info from my angular without having to log 2 times so the api can work transparently for the user once logged from the frontend



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source