nocmt / eWeLinkOAuthLoginDemo

The Unlicense
14 stars 4 forks source link

Cant login using https://c2ccdn.coolkit.cc/oauth/index.html #5

Closed Kiogora closed 11 months ago

Kiogora commented 11 months ago

Hi,

I have an authenticated account with valid app_id. Free tier. I have run this code, however, I cant login via the authorization page generated https://c2ccdn.coolkit.cc/oauth/index.html by this repository. Kindly assist. A peek at the browser console shows:

incorrect redirectUrl:undefined

Also is the sonoff POW Elite part of the brands that do not need paid authorization from other manufacturer.

Regards, Alois.

Kiogora commented 11 months ago

Resolved, the redirect url was not being set well in eWeLinkOAuthLoginDemo/node_modules/ewelink-api-next/dist/ as set_url was setting to undefined, despite being defined as 'eu'. I am still digging into this, but setting eu in this.setUrl() in the same file worked. I am still digging around to see why this occured.

Kiogora commented 11 months ago

I am however leaving the issue open till I find the reason.

Kiogora commented 11 months ago

In the meantime, a response to:

is the sonoff POW Elite part of the brands that do not need paid authorization from other manufacturer

would be highly appreciated.

ghost commented 11 months ago
  1. This example requires that redirectUrl be defined as http://127.0.0.1:8000/redirectUrl It can be filled in in the Developer Center ->Application Management ->Editing section, which affects the process of creating authorization page URLs and obtaining tokens after successful login. If you can read the document, you will understand this process and logic.

OAuth2.0 FlowChart

  1. POWR316D、POWR320D belongs to the SONOFF brand model and has been authorized for free.