Dynamic redirect in the authorization callback in node express?

You can use state parameter to send some data during authorize call, which will be returned back to the callback url after authentication. You can send in a destination URL as state which will be returned to the callback url.

But ideally you might have to generate an opaque value and pair it with the destination url in a local store. Then send this opaque value as state and use it in callback url code to redirect user to destination URL