YunoHost-Apps / akkoma_ynh

Social media based on ActivityPub, fork of Pleroma
https://akkoma.social/
GNU Affero General Public License v3.0
15 stars 6 forks source link

Invalid credentials error when signing in to non-LDAP accounts #15

Open Graycot opened 1 year ago

Graycot commented 1 year ago

Problem: After registering a non-YunoHost/LDAP Akkoma account, signing in throws a "Invalid Credentials" error.

Solution: Go to the Admin FE > Settings > Authentication > LDAP > Toggle off "Enabled".

Note: Signing in with the original LDAP connected admin account is not affected by disabling LDAP, and works as normal.

bugsysop commented 1 year ago

Workerd for me with Pleroma, but not with Akkoma.

Worked like a charm on a new install of Akkoma. On the old one I possibly messed up the config playing with to many options.

lapineige commented 1 year ago

Do you use a password with special characters @Graycot ?

Graycot commented 1 year ago

Do you use a password with special characters @Graycot ?

No, I did not.

lapineige commented 1 year ago

So if I understand correctly :

Which version are you using ?

12 fixed a syntax error in LDAP config, maybe that changed something ?

tio-trom commented 1 year ago

Same here with the latest 3.7.1~ynh1 version. My config looks like this:

config :pleroma, Pleroma.Web.Auth.Authenticator, Pleroma.Web.Auth.LDAPAuthenticator
config :pleroma, :ldap,
  enabled: true,
  host: "localhost",
  port: 389,
  ssl: false,
  # sslopts: [],
  tls: false,
  # tlsopts: [],
  base: "ou=users,dc=yunohost,dc=org",
  uid:  "uid"

If I try to set enabled: false it still does not work. Is there a way to entirely remove LDAP from Akkoma?

Edit: I am stupid. I should have read the docs and the main comment here. Works now. Sorry.

lapineige commented 1 year ago

What was the issue ?

tio-trom commented 1 year ago

What was the issue ?

For me trying to login with non LDAP users. Would not work. Disabling LDAP entirely fixes the issue.

Graycot commented 1 year ago

What was the issue ?

For me trying to login with non LDAP users. Would not work. Disabling LDAP entirely fixes the issue.

This is the issue and solution I experienced.

lapineige commented 1 year ago

I hope recent config change would fix it… if anyone can try a fresh install of #28… or check their /etc/akkoma/config.exs file and see if this part it's the same as in https://github.com/YunoHost-Apps/akkoma_ynh/blob/2023.04/conf/ldap.exs

lapineige commented 1 year ago

Thanks for sharing the workaround, because I suddenly encountered this issue recently… it was quick and easy to identify and fix it thanks to you.

I wonder if we should disable LDAP by default until we integrate it properly 🤔

lapineige commented 1 year ago

As a side note, I had to dump instance config from database, change the values, then migrate config file to db again, as I would have lost my settings (done from the admin UI) it if I migrated the config file first. Here are the commands (adapt them according to our Readme) : https://docs-develop.pleroma.social/backend/administration/CLI_tasks/config/