NucleosUserBundle icon indicating copy to clipboard operation
NucleosUserBundle copied to clipboard

invalid password migrating from FOSUserBundle

Open tacman opened this issue 3 years ago • 1 comments

Question

I'm migrating from FOSUser, but when I go to login, I'm getting invalid password. It's a very old database, I imagine the issue is related to the security that's used hashing the passwords.

Since I'm using Symfony 6, I need a password hasher in security, I took a stab at this. How do I bypass this and use that Nucleos password hashing, which I assume will work with an old FOS User table.

Thanks

# security.yaml
    password_hashers:
        # FOS\UserBundle\Entity\User:
        App\Entity\User:
            algorithm: sha512
            encode_as_base64: false
            iterations: 1
    #    App\Entity\User: plaintext
    # https://symfony.com/doc/current/security.html#where-do-users-come-from-user-providers

    providers:
        nucleos_userbundle:
            id: nucleos_user.user_provider.username

tacman avatar Jun 26 '22 14:06 tacman

Or maybe I'm approaching this wrong. Is it possible to migrate from FOSUserBundle to this bundle with a legacy database?

tacman avatar Jun 27 '22 20:06 tacman