webflow / js-webflow-api

Node.js SDK for the Webflow Data API
https://www.npmjs.com/package/webflow-api
296 stars 95 forks source link

🐛 issue with authorizeUrl method #84

Closed EvanBurbidge closed 1 year ago

EvanBurbidge commented 1 year ago

Hi All, I'm following along on your starter tutorial and have noticed an issue with your authorizeUrl method.
It keeps returning https://undefined/oauth

I've debugged the issue and what's happening is that the value of this is not actually getting the correct values.

Instead of using this.host it should be looking for this.client.host

I've attached screenshots from my debugger

Screenshot 2023-02-01 at 20 12 43 Screenshot 2023-02-01 at 20 12 50
johnagan commented 1 year ago

I think you're right - good catch! I'll try to get a fix in this week. Thank you!

johnagan commented 1 year ago

@EvanBurbidge which version are you using? I am not seeing your code example in the latest (v1.2.2)

EvanBurbidge commented 1 year ago

Hi @johnagan sorry just checked there I was on a much easier version, after bumping to the latest the issue is resolved!

Thanks for looking into this!

Closing :)