I'm interacting with an interface that takes a callback which should return synchronously. However I need to perform async tasks inside this callback, using the data provided to it. This is on the server in an express app.
Interface(
args etc,
async (callback args) => {
return await asyncProcess(callback args)
}
)
I know about this thread. Is there a workaround when you don't have full control over the entirety of your app?
(The interface is the passport.js library, which I'm using for authentication in an express app. The asynchronous process is a call to a database.)