Client wants to switch its password hashing from SHA-1 to SHA-256 but can anyone suggest how to migrate old users to new hashing. I have already two strategies that are mentioned below.
Force Password change: By enabling force password change every user has to change his/her password one time.
Change Password on Login: When user enters his/her password first check correct password with old hashing than update password in DB with new hashing.
But in both above methods I have to keep both hashing's in the code but client wants to remove SHA-1 from code. Is there any other approach to tackle this issue.