BitcasaFileLister icon indicating copy to clipboard operation
BitcasaFileLister copied to clipboard

Redirect after oauth going to localhost not to IP

Open SoySoy22 opened this issue 12 years ago • 12 comments

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?

SoySoy22 avatar Nov 10 '14 17:11 SoySoy22

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

reallistic avatar Nov 10 '14 17:11 reallistic

You can setup the redirect url in utils.py

ghost avatar Nov 10 '14 17:11 ghost

edit snip

reallistic avatar Nov 10 '14 17:11 reallistic

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

SoySoy22 avatar Nov 10 '14 17:11 SoySoy22

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 avatar Nov 10 '14 17:11 reallistic

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

reallistic avatar Nov 10 '14 17:11 reallistic

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".

SoySoy22 avatar Nov 10 '14 17:11 SoySoy22

Good idea.

reallistic avatar Nov 10 '14 17:11 reallistic

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 avatar Nov 10 '14 17:11 SoySoy22

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

SoySoy22 avatar Nov 10 '14 18:11 SoySoy22

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

reallistic avatar Nov 10 '14 18:11 reallistic

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

reallistic avatar Nov 12 '14 14:11 reallistic