Account Linking through Google Home App consists of two steps: Users are sent to your Authorization Url to provide credentials and complete the consent flow. Once this process is completed successfully, your server gets a token exchange request containing the authorization code at your Token Url. In order to debug this flow, you might need to understand if your credentials exchange completes successfully. You can learn more from the Account Linking Documentation for Google Home.
Also a heads up here, in case this is relevant to your issue. Many function calls and variable values are called/populated asynchronously in NodeJS. In case you are reading their values without waiting for them to get executed properly, you might end up with undefined values. You might want to go through your code and check if you are waiting for the values in a synchronous (blocking) manner.
If you still have issues after debugging, you can also go through our introductory codelab. It does have a fully functioning OAuth 2.0 implementation that you can take reference