[GH-ISSUE #820] Route /api/login not available #389

Closed
opened 2026-02-25 23:34:07 +03:00 by kerem · 8 comments
Owner

Originally created by @pettersillander on GitHub (Jan 23, 2024).
Original GitHub issue: https://github.com/go-shiori/shiori/issues/820

Data

  • 1.6.0-rc.6:

Describe the bug / actual behavior

It seems there's no route for /api/login currently.

Expected behavior

Http client should be able use /api/login to authenticate session

To Reproduce

curl http://example.com/api/login -d {"login details"} -> 404

Notes

This (/api/login) route is in API.md. But for api auth one would still need to use only api/v1/auth/login endpoint it seems.

Maybe there should be a notice in the api docs or is this going to change soon?

Originally created by @pettersillander on GitHub (Jan 23, 2024). Original GitHub issue: https://github.com/go-shiori/shiori/issues/820 ## Data - **1.6.0-rc.6**: ## Describe the bug / actual behavior It seems there's no route for /api/login currently. ## Expected behavior Http client should be able use /api/login to authenticate session ## To Reproduce curl http://example.com/api/login -d {"login details"} -> 404 ## Notes This (/api/login) route is in [API.md](https://github.com/go-shiori/shiori/blob/master/docs/API.md). But for api auth one would still need to use only api/v1/auth/login endpoint it seems. Maybe there should be a notice in the api docs or is this going to change soon?
kerem closed this issue 2026-02-25 23:34:07 +03:00
Author
Owner

@Monirzadeh commented on GitHub (Jan 23, 2024):

we move to api/v1/auth/login and for new api i suggest review this https://github.com/go-shiori/shiori/blob/master/docs/APIv1.md for login and we remove that for v1.6
we plan that to update documentation here in #663
if you think it should not close please mention here.

<!-- gh-comment-id:1905986338 --> @Monirzadeh commented on GitHub (Jan 23, 2024): we move to api/v1/auth/login and for new api i suggest review this https://github.com/go-shiori/shiori/blob/master/docs/APIv1.md for login and we remove that for v1.6 we plan that to update documentation here in #663 if you think it should not close please mention here.
Author
Owner

@pettersillander commented on GitHub (Jan 23, 2024):

Sorry, I mixed old and new api. v1 is the new one, not other way round. Thanks, all good then.

<!-- gh-comment-id:1905998124 --> @pettersillander commented on GitHub (Jan 23, 2024): Sorry, I mixed old and new api. v1 is the new one, not other way round. Thanks, all good then.
Author
Owner

@wbste commented on GitHub (Feb 18, 2024):

I'm getting the opposite error and different issue. http://desktop.lan/api/v1/auth/login doesn't exist but the older API does. When I call it I get a 200, but the expiration date is when it's sent. Therefore I can never get a valid session id. Running the windows x64 binary from here: shiori_Windows_x86_64.tar.gz. Any thoughts? Is there a way I can just use the CLI to change the master password?

Running server with .\shiori.exe serve --portable

POST http://desktop.lan/api/login HTTP/1.1
content-type: application/json

{
	"username": "shiori",
	"password": "gopher",
	"remember": true,
	"owner": true
}
HTTP/1.1 200 OK
Server: nginx/1.24.0
Date: Sun, 18 Feb 2024 16:16:37 GMT
Content-Type: application/json
Content-Length: 145
Connection: close

{
  "session": "XXXX",
  "account": {
    "id": 0,
    "username": "shiori",
    "owner": true
  },
  "expires": "Sun, 18 Feb 2024 17:16:37 UTC"
}
<!-- gh-comment-id:1951374790 --> @wbste commented on GitHub (Feb 18, 2024): I'm getting the opposite error and different issue. `http://desktop.lan/api/v1/auth/login` doesn't exist but the older API does. When I call it I get a 200, but the expiration date is when it's sent. **Therefore I can never get a valid session id**. Running the windows x64 binary from here: [shiori_Windows_x86_64.tar.gz](https://github.com/go-shiori/shiori/releases/tag/v1.5.5). Any thoughts? Is there a way I can just use the CLI to change the master password? Running server with `.\shiori.exe serve --portable` ``` POST http://desktop.lan/api/login HTTP/1.1 content-type: application/json { "username": "shiori", "password": "gopher", "remember": true, "owner": true } ``` ``` HTTP/1.1 200 OK Server: nginx/1.24.0 Date: Sun, 18 Feb 2024 16:16:37 GMT Content-Type: application/json Content-Length: 145 Connection: close { "session": "XXXX", "account": { "id": 0, "username": "shiori", "owner": true }, "expires": "Sun, 18 Feb 2024 17:16:37 UTC" } ```
Author
Owner

@Monirzadeh commented on GitHub (Feb 18, 2024):

Which version?
please add command that use to run server?

<!-- gh-comment-id:1951414782 --> @Monirzadeh commented on GitHub (Feb 18, 2024): Which version? please add command that use to run server?
Author
Owner

@wbste commented on GitHub (Feb 18, 2024):

Which version? please add command that use to run server?

Version of...? I gave a link to the release I'm using above if that's what you were looking for.

EDIT: I don't even see the default account in the sqlite dB...just the read only account I created. Is there some other place to change it?

<!-- gh-comment-id:1951440715 --> @wbste commented on GitHub (Feb 18, 2024): > Which version? please add command that use to run server? Version of...? I gave a link to the release I'm using above if that's what you were looking for. EDIT: I don't even see the default account in the sqlite dB...just the read only account I created. Is there some other place to change it?
Author
Owner

@Monirzadeh commented on GitHub (Feb 18, 2024):

I don't acsses to my system right now.
Can you please run shiori with server instead of serve
About the user as I remmmber we change the way default user work and not have that in database anymore.

<!-- gh-comment-id:1951452893 --> @Monirzadeh commented on GitHub (Feb 18, 2024): I don't acsses to my system right now. Can you please run shiori with `server` instead of `serve` About the user as I remmmber we change the way default user work and not have that in database anymore.
Author
Owner

@wbste commented on GitHub (Feb 18, 2024):

I don't acsses to my system right now. Can you please run shiori with server instead of serve About the user as I remmmber we change the way default user work and not have that in database anymore.

.\shiori.exe server --portable
Error: unknown command "server" for "shiori"

Did you mean this?
        serve

Run 'shiori --help' for usage.
time="2024-02-18T14:38:46-08:00" level=fatal msg="unknown command \"server\" for \"shiori\"\n\nDid you mean this?\n\tserve\n"

I want to basically disable that default username and password, so let me know how to do that. Either delete that account, change the password, or...

<!-- gh-comment-id:1951469121 --> @wbste commented on GitHub (Feb 18, 2024): > I don't acsses to my system right now. Can you please run shiori with `server` instead of `serve` About the user as I remmmber we change the way default user work and not have that in database anymore. ``` .\shiori.exe server --portable Error: unknown command "server" for "shiori" Did you mean this? serve Run 'shiori --help' for usage. time="2024-02-18T14:38:46-08:00" level=fatal msg="unknown command \"server\" for \"shiori\"\n\nDid you mean this?\n\tserve\n" ``` I want to basically disable that default username and password, so let me know how to do that. Either delete that account, change the password, or...
Author
Owner

@Monirzadeh commented on GitHub (Feb 19, 2024):

I don't acsses to my system right now. Can you please run shiori with server instead of serve About the user as I remmmber we change the way default user work and not have that in database anymore.

.\shiori.exe server --portable
Error: unknown command "server" for "shiori"

Did you mean this?
        serve

Run 'shiori --help' for usage.
time="2024-02-18T14:38:46-08:00" level=fatal msg="unknown command \"server\" for \"shiori\"\n\nDid you mean this?\n\tserve\n"

I want to basically disable that default username and password, so let me know how to do that. Either delete that account, change the password, or...

OK i finally test that my self
new API activate for login in v1.6 not v1.5.5.
about default user. when you login with default user name (shiori) and password (gopher) go to the settings and add new account as owner (default username and password will disable automatically after your create first real account in settings)
change password and other things available in settings too.

<!-- gh-comment-id:1953065511 --> @Monirzadeh commented on GitHub (Feb 19, 2024): > > I don't acsses to my system right now. Can you please run shiori with `server` instead of `serve` About the user as I remmmber we change the way default user work and not have that in database anymore. > > ``` > .\shiori.exe server --portable > Error: unknown command "server" for "shiori" > > Did you mean this? > serve > > Run 'shiori --help' for usage. > time="2024-02-18T14:38:46-08:00" level=fatal msg="unknown command \"server\" for \"shiori\"\n\nDid you mean this?\n\tserve\n" > ``` > > I want to basically disable that default username and password, so let me know how to do that. Either delete that account, change the password, or... OK i finally test that my self new API activate for login in v1.6 not v1.5.5. about default user. when you login with default user name (shiori) and password (gopher) go to the settings and add new account as owner (default username and password will disable automatically after your create first real account in settings) change password and other things available in settings too.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/shiori#389
No description provided.