Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't log in with default username & password #15

Closed
ech0r opened this issue Apr 21, 2018 · 9 comments
Closed

Can't log in with default username & password #15

ech0r opened this issue Apr 21, 2018 · 9 comments

Comments

@ech0r
Copy link

ech0r commented Apr 21, 2018

Hello, I've followed the installation steps exactly.

When I try the default user/pass of tania/tania, I cannot log in.

I've checked the database file, tania.db and it shows the default user account is in there.
It seems for some reason the login page is unable to read that file?

Any help would be much appreciated.

My conf.json looks like this:

"tania_persistence_engine": "sqlite",
"demo_mode": true,
"upload_path_area": "uploads/areas",
"upload_path_crop": "uploads/crops",
"sqlite_path": "db/sqlite/tania.db",
"mysql_host": "127.0.0.1",
"mysql_port": "3306",
"mysql_dbname": "tania",
"mysql_user": "root",
"mysql_password": "root",
"redirect_uri": "http://localhost:8080/",
"client_id": "f0ece679-3f53-463e-b624-73e83049d6ac"
@hitechredneck
Copy link

I have the same issue on windows 7 whether building or using a prebuilt release. Both fail the same as stated above.

@adhatama
Copy link
Contributor

@ech0r Did you use custom Go port instead of the default :8080?

@ech0r
Copy link
Author

ech0r commented Apr 23, 2018

I was using port 8080, is there another port I should be using?

Thanks for replying :)

@adhatama
Copy link
Contributor

@ech0r No. It should be good.
And did you use localhost for the hostname too?
If yes, then I don't have a clue why it didn't work on your machine.
Can you please give us a log from the browser console and the response when calling http://yourhostname:8080/api/authorize?
If you are not using localhost for your hostname, you need to change your conf.json in "redirect_uri": "http://localhost:8080/" to match your current hostname.

@ech0r
Copy link
Author

ech0r commented Apr 24, 2018

I get the following response when visiting http://localhost:8080/api/authorize

{"message":"Method Not Allowed"}

I am running this locally, so localhost is correct

@adhatama
Copy link
Contributor

@ech0r Sorry, I mean that can you check out from your browser network what is the response of http://localhost:8080/api/authorize when you're doing login?
When doing login, the frontend will request to http://localhost:8080/api/authorize so we could know what actually happened when login by looking at the response from that request.

@ech0r
Copy link
Author

ech0r commented Apr 24, 2018

When I try to login I see a POST request to http://localhost/api/authorize

Then below that I get OPTIONS with http://localhost:8080/?access_token=63592b30-498d-4b60-b563-561d5bc33ff1&state=random-string&expires_in=0

I'm running Tania inside of a Docker container with port 80 mapped to 8080 on the tania container.

So to access the web app I just go to http://localhost

image

@adhatama
Copy link
Contributor

adhatama commented Apr 24, 2018

@ech0r Thanks for the report.
Can you please change your "redirect_uri": "http://localhost:8080/" to "redirect_uri": "http://localhost/" in your conf.json? Because your web apps is using localhost without port so after login, it will be redirected to that redirect url.

@bepitulaz
Copy link
Member

I think this issue had been solved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants