Code Monkey home page Code Monkey logo

Comments (6)

galnir avatar galnir commented on June 20, 2024

I think you can just add another redirect URL in the Discord developer portal and call it a day? You wouldn't run the repo on two machines at the same time, so you can set the URL to whatever you need and avoid this?

Am I right or is it more comfortable for you in the way you recommend?

from master-bot.

PhantomNimbi avatar PhantomNimbi commented on June 20, 2024

I think you can just add another redirect URL in the Discord developer portal and call it a day? You wouldn't run the repo on two machines at the same time, so you can set the URL to whatever you need and avoid this?

Am I right or is it more comfortable for you in the way you recommend?

This doesn't actually use two machines. It actually allows the dashboard to work properly from both the internal IP and public IP of the server.

So if you host in your own machine you don't need to have a separate internet provider to use the dashboard.

Without this you have to choose either private dashboard that can only be accessed by the host or Public that can't be accessed by the host.

With this the dashboard can be used by both the host and public users.

See my PR for a working fix implemented.

from master-bot.

Bacon-Fixation avatar Bacon-Fixation commented on June 20, 2024

im confused, i run master-bot publicly and don't have any issues with getting to the dashboard via http://localhost:3000 or public ip, or the domain name

Does this hide your public ip from the invite url?

For me, I paid for a web domain ($1 a month) so I could obfuscate the public IP from the Invite URL (IP can still be found by looking up the DNS info tho)

Much Love
-Bacon

from master-bot.

PhantomNimbi avatar PhantomNimbi commented on June 20, 2024

im confused, i run master-bot publicly and don't have any issues with getting to the dashboard via http://localhost:3000 or public ip, or the domain name

Does this hide your public ip from the invite url?

For me, I paid for a web domain ($1 a month) so I could obfuscate the public IP from the Invite URL (IP can still be found by looking up the DNS info tho)

Much Love
-Bacon

The problem is when you try to invite it to a server.

It looks for the specified callback Url which only works if you have access to the IP specified.

So if you set NEXTAUTH_URL to http://localhost:3000, only the host system will be able to actually use the dashboard. And if you set NEXTAUTH_URL to http://public_ip:3000 then it will only be useable to users outside your internet connection.

You can connect with http://localhost:3000 regardless but you can't invite the bot or use the dashboard when hosting from your own machine if you don't have both the internal and public IP set.

Whith this the dashboard is useable to both the localhost and public IP.

Naturally this also requires two callback urls but it fixes the issue with hosting from your own machine rather than from a VPN.

As for the domain name. That renders this method completely unneeded since you can add all required IP addresses to the domain name and set the domain name as the NEXTAUTH_URL.

This is just for those who don't want to pay for a domain to be able to use their own dashboard and still have it publicly useable.

from master-bot.

PhantomNimbi avatar PhantomNimbi commented on June 20, 2024

An easier explanation is if you use http://localhost:3000 as the NEXTAUTH_URL than the redirect when logging in will always be http://localhost:3000/auth/discord no matter what system or ip you try to login from. and obviously that won't work if you're not logging in from the host machine. This fixes that issue basically.

Or at the very least that's what it does for me if I don't have the NEXTAUTH_URL_INTERNAL option to separate the public ip from the private ip.

from master-bot.

galnir avatar galnir commented on June 20, 2024

merged #757

from master-bot.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.