How to get authorization code with node-asana (use response_type=code) instead of access token?

authorization

#1

There’s an integration on the python back end that uses authorization code, exchange it with access_token and refresh_token, saves in database and does some more things. It works.

I have to write the front end part. I think that use node-asana is the good idea for that. I have clientId, redirectUrl, I can run client.authorize using PopupFlow or redirect flow, and it also works. After authentication I receive accessToken, and I can do a number of things. For example, I can run client.users.me() method and receive some user data.

The issue is I don’t need nether accessToken nor user data. The only thing I need is authorization code. That’s the code that I get when request https://app.asana.com/-/oauth_authorize?client_id=…&response_type=code&redirect_uri=…&scope=default url. Is it possible to use node-asana somehow to receive this code?