reallistic / BitcasaFileLister

List and download files in your bitcasa drive via api
https://rose-llc.com/bitcasafilelist/
16 stars 3 forks source link

Redirect after oauth going to localhost not to IP #46

Closed SoySoy22 closed 10 years ago

SoySoy22 commented 10 years ago

I run everything on a server. After signing in to bitcasa i get redirected to localhost..... not to IP....

Is it possible to make an IP lookup? Or shall I hardcode it?

reallistic commented 10 years ago

This is the expected behavior. Please post your logs and the command you executed that caused this.

ghost commented 10 years ago

You can setup the redirect url in utils.py

reallistic commented 10 years ago

edit snip

SoySoy22 commented 10 years ago

I did not find a log.

I started python BitcasaFileLister went via Firefox to the fitting Webpage (IP:1115) then to bitcasa trying to login. After that I got redirect to localhost:1115+key. But not to IP:1115

reallistic commented 10 years ago

I just realized your comment. about running on a server. off the top of my head it is not simple to just figure out if an ip lookup is necessary and then use that instead. You will have to manually change the redirect url in utils.

reallistic commented 10 years ago

It should have logged directly to console. But don't worry about the logs. I misunderstood the question.

SoySoy22 commented 10 years ago

Okay. No problem with that. Just wanted to ask first. Perhaps it might be able to overwrite the "normal" IP by using "--IP x.x.x.x".

reallistic commented 10 years ago

Good idea.

SoySoy22 commented 10 years ago

I would recommend doing this for api keys too.

So if its first launched ask for IP and the API keys. If nothing is entered keep yours as default.

SoySoy22 commented 10 years ago

Changing the IP in utils.py does not help completely.

You need to fix l. 77 in server.py too

" client = bitcasa_utils.create_client(force=True, redirect_uri="http://localhost:1115/bitcasafilelister/auth")"

This should reference to REDIRECT_URI in utils.py as far as I understand

reallistic commented 10 years ago

Huh, thought I had changed that to use the utils uri. I'll be sure to switch that as well.

reallistic commented 10 years ago

You can now set this in utils.py. Implemented in d5f7407623dfa19b90a34665233595b68890ac85