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

Default User and Password #9

Closed
omarperezr opened this issue Apr 12, 2018 · 10 comments
Closed

Default User and Password #9

omarperezr opened this issue Apr 12, 2018 · 10 comments
Assignees

Comments

@omarperezr
Copy link

omarperezr commented Apr 12, 2018

When I try to log in with

username: tania
password: tania

It gives me an error "Incorrect user/password"

@adhatama @kerwinjorbina @gkgranada @purwandi

@bepitulaz
Copy link
Member

bepitulaz commented Apr 13, 2018

Hello @theg3ntl3man,

Try to change upload_path_area, upload_path_crop, and sqlite_path in your conf.json file like mine. I use the relative path instead of the absolute one, and it works.

{
    "tania_persistence_engine": "sqlite",
    "demo_mode": true,
    "upload_path_area": "uploads/areas",
    "upload_path_crop": "uploads/crops",
    "sqlite_path": "db/sqlite/ddl.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"
}

I made a PR #10 for this issue.

@omarperezr
Copy link
Author

Still not working, this is what is shown when trying to log in

{"time":"2018-04-13T02:21:31.008361772Z","id":"","remote_ip":"xxx.xxx.xxx.xx","host":"xxx.xxx.xx.xxx:8080","method":"POST","uri":"/api/authorize","status":302, "latency":95799496,"latency_human":"95.799496ms","bytes_in":162,"bytes_out":0}
{"time":"2018-04-13T02:22:08.409318822Z","level":"ERROR","prefix":"echo","file":"echo.go","line":"284","message":"code=405, message=Method Not Allowed"}
{"time":"2018-04-13T02:22:08.409412398Z","id":"","remote_ip":"95.xxx.xxx.xxx","host":"check.proxyradar.com:80","method":"CONNECT","uri":"check.proxyradar.com:80","status":405, "latency":164008,"latency_human":"164.008µs","bytes_in":0,"bytes_out":32}

this is my conf.json

{
"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"
}

I created the empty tania.db file in that folder like they told me to

It passes every test

@kerwinjorbina
Copy link
Contributor

@theg3ntl3man Can you try to remove the tania.db file?

Last time I worked on this, the sqlite file is automatically created. So, when you run the application for the first time, it automatically creates the tania.db file with the default user.

@adhatama
Copy link
Contributor

@theg3ntl3man Did you use custom hostname (not localhost) for your Go server hostname?
Because it can affect the OAuth Redirect URI that already set in your conf.json.

@chrigui
Copy link

chrigui commented Apr 13, 2018

Hi,
Its great to see the go migration is going well.
I am having the same issue... I cannot login.
Http://206.189.17.236:8080

@adhatama
Copy link
Contributor

@chrigui Hi,
I think it's because you use hostname other than localhost.
In the conf.json, there is redirect_uri that is used for auth to be worked. You need to adjust that to your hostname.
But we still had an issue in the frontend because the redirect URI is still hardcoded to http://localhost:8080/.

So there are two solution for this:

  1. Change your hostname to localhost, or
  2. Change your conf.json redirect_uri to http://206.189.17.236:8080/ and in the resources/js/pages/auth/login.vue redirect_uri to http://206.189.17.236:8080/ also. Don't forget to recompile the frontend with npm run dev.

We will fix this soon.

@chrigui
Copy link

chrigui commented Apr 13, 2018

Option 2 Worked, thank you @adhatama.

@hitechredneck
Copy link

I get the same issue with both (windows and linux) 1.5.1 prebuilt builds.

@pljoel
Copy link

pljoel commented Jul 8, 2018

+1 I also get the same issue on linux for 1.5.1 prebuilt build.

@adhatama
Copy link
Contributor

adhatama commented Jul 8, 2018

It looks like the prebuilt cannot find the conf.json because the frontend's prebuilt path is different from the repository.
We are working on this.
In the meantime, we can still use the manual build from the README.md

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

7 participants