superseriousbusiness / gotosocial

Fast, fun, small ActivityPub server.
https://docs.gotosocial.org
GNU Affero General Public License v3.0
3.67k stars 310 forks source link

[bug/0.6.0-rc2] Can't login with newly created user #1201

Closed Fastidious closed 1 year ago

Fastidious commented 1 year ago

Describe the bug with a clear and concise description of what the bug is.

Can't login with newly created user. I created a brand new user, and promoted it to admin:

./gotosocial --config-path ./config.yaml admin account create --username admin --email user@example.com --password 'example.com-admin123'
./gotosocial --config-path ./config.yaml admin account confirm --username admin
./gotosocial --config-path ./config.yaml admin account promote --username admin

What's your GoToSocial Version?

0.6.0-rc2

GoToSocial Arch

amd64

Browser version

Safari 16.1 (17614.2.9.1.13, 17614)

What happened?

When trying to login with newly created user I get:

Unauthorized: password/email combination was incorrect: If you arrived at this error during a login/oauth flow, please try clearing your session cookies and logging in again; if problems persist, make sure you're using the correct credentials

What you expected to happen?

I should be able to login.

How to reproduce it?

Create a new user with following steps (from documentation):

./gotosocial --config-path ./config.yaml admin account create --username admin --email user@example.com --password 'example.com-admin123'
./gotosocial --config-path ./config.yaml admin account confirm --username admin
./gotosocial --config-path ./config.yaml admin account promote --username admin

Anything else we need to know?

Tried with Chrome too, as well as both (Safari and Chrome) browsers on incognito/private modes. Same result.

tsmethurst commented 1 year ago

I think I know what's happened here: can you try restarting your gts instance and then logging in with that user? If that works then I know what the issue is

Fastidious commented 1 year ago

@tsmethurst tried (on incognito), same error. I think I am hitting #1106.

tsmethurst commented 1 year ago

Alright, will have a closer look, thanks!

Fastidious commented 1 year ago

@tsmethurst doing a:

select * from users

Shows there is no email address on the newly added user. How can I manually insert the address to it?

tsmethurst commented 1 year ago

Yep, found the bug, fixing it in the code now.

To manually insert address:

UPDATE users SET email='someone@example.org' WHERE id='ID_OF_YOUR_USER';
Fastidious commented 1 year ago

Now I broke both accounts. 😂

tsmethurst commented 1 year ago

Now I broke both accounts

:grimacing: how?

Fastidious commented 1 year ago

Probably because I am confused on which is the id. I will figure it out, after trial and error. 🙈