Skip to content

invalid password migrating from FOSUserBundle #661

@tacman

Description

@tacman

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions