Recommand · August 20, 2021 0

How to use oauth in express to allow users to connect to third party api with their credentials

Users authenticate to my express/react (actually NextJS) app using Discord with OAuth, which gets stored in my database/I cache their JWT.

I want to then call a third party API ( using credentials they enter to get their character’s alts.

I need some advice on how I would go about this – I’m lost in the correct terms, but would I use middleware here? I assume I have them auth and then I cache their token, but I’m struggling to google as I don’t really know the correct terms to search.