real2two / dashactyl

The better version of FusionPanel.
MIT License
1 stars 0 forks source link

Only absolute urls are supported #36

Closed BananaBlu77 closed 3 years ago

BananaBlu77 commented 3 years ago

I have this problem: when i click on the "Authorize" button in the discord OAuth2 page this error shows up in the console and the page loads forever.

Error:

(node:379526) UnhandledPromiseRejectionWarning: TypeError: Only absolute URLs are supported
    at getNodeRequestOptions (/home/dashactyl/node_modules/node-fetch/lib/index.js:1305:9)
    at /home/dashactyl/node_modules/node-fetch/lib/index.js:1410:19
    at new Promise (<anonymous>)
    at fetch (/home/dashactyl/node_modules/node-fetch/lib/index.js:1407:9)
    at app.get (/home/dashactyl/api/oauth2.js:205:37)
    at process._tickCallback (internal/process/next_tick.js:68:7)
(node:379526) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
(node:379526) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

The ridirect url is set to "http://domain.com:85" and the callback path is "/callback"

real2two commented 3 years ago

Add "http(s)://" to your domains.

BananaBlu77 commented 3 years ago

The error still show up in the console.

I added a certificate to dashactyl using nginx reverse proxy, so i can connect to dashactyl with https://domain.com. The redirect uri is "https://domain.com/callback" and the url in the proxy is "http://127.0.0.1:85" (I'm running nginx and dashactyl on the same machine.)

tanguy-fgl commented 3 years ago

I have the same error and I'm using https