Code Monkey home page Code Monkey logo

Comments (7)

Stedoss avatar Stedoss commented on September 2, 2024

That request suggests that you are trying to use port 80 for the callback, which most likely won't work due to how linux port binding works (ossapi spins up its own server to accept the token callback). Try a port above 1024, which should be linux user bindable.

from ossapi.

ibuergis avatar ibuergis commented on September 2, 2024

image
I now tried it with the example port and several other ports but I still get the same result. I also made sure to update the information in the code and on osu accordingly

from ossapi.

tybug avatar tybug commented on September 2, 2024

I'm not entirely sure how remoting into an aws server works or how you are accessing the webpage , so it's hard for me to offer specific advice. But maybe it will help you debug if I describe the flow ossapi goes through:

  • ossapi = Ossapi(client_id, client_secret, redirect_url) is called
  • ossapi opens an oauth page on osu.ppy.sh using webbrowser.open.
    • I don't know what this defaults to on aws or linux.
  • ossapi opens a socket on the localhost port specified in redirect_url.
  • when you click "authenticate" in your browser on the oauth page opened in step 2, you are redirected to the port on localhost, where ossapi receives your credentials in the http GET headers of that request.

This process could be failing at a few places here. It may be up to you to determine which step, or provide more info.

from ossapi.

tybug avatar tybug commented on September 2, 2024

I'm going to close this for now, but feel free to comment with more information and I'll try to help as best I can! Who knows - we might have a real bug here, or something ossapi can do better.

from ossapi.

ibuergis avatar ibuergis commented on September 2, 2024

So I looked into it again and Ive tried two things:

I created a new instance with windows using the same security rules.
I started a webserver myself on the port to see if I can even open and access the webserver using the port.

First the windows one surprisingly works fine which is good and does proof that my aws settings should support opening ports.

The webserver that I started also worked fine and I had full access on it.

It does seem like that the way ossapi opens the socket isnt compatible with amazon linux for some reason.

I ran the webserver with this command: "python3 -m http.server 3914 --directory ~/folder".

from ossapi.

tybug avatar tybug commented on September 2, 2024

Thanks for the update.

I wonder if changing ossapi to use serversocket.bind(("127.0.0.1", port)) instead of serversocket.bind(("localhost", port)) would make a difference here.

from ossapi.

ibuergis avatar ibuergis commented on September 2, 2024

it doesnt hurt to try...

from ossapi.

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.