Classic ASP: Help with OAuth2 Token

I am stumped with setting up an API call to Xero Accounts using OAuth2, any assistance
would be really appreciated.

I can successfully logon and retrieve data using postman/paw

I have my Server Action setup as follows (all values match)

I have a button that loads the server action, but when clicked or if I open the server action, nothing happens just the following error. ‘refresh’ is undefined


Thanks

https://login.xero.com/identity/connect/authorize?response_type=code&client_id=YOURCLIENTID&redirect_uri=YOURREDIRECTURI&scope=offline access accounting.contacts&state=123

I have added the response type, redirect_uri, scope and state to the params of the OAuth2 Provider Action, but still returns the same ‘refresh’ is undefined message.

BTW, I am using Classic ASP as the server model.

I cannot work out what is wrong with modules/oauth.asp line 95

modules/oauth.asp",“lineNumber”:95,“errorNumber”:-2146823279,“message”:"‘refresh’ is undefined