Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

invalid password migrating from FOSUserBundle #661

Open
tacman opened this issue Jun 26, 2022 · 1 comment
Open

invalid password migrating from FOSUserBundle #661

tacman opened this issue Jun 26, 2022 · 1 comment

Comments

@tacman
Copy link
Contributor

tacman commented Jun 26, 2022

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
Copy link
Contributor Author

tacman commented Jun 27, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant