games647 / FlexibleLogin

A Sponge minecraft server plugin for second factor authentication
https://forums.spongepowered.org/t/8872
MIT License
87 stars 23 forks source link

BCrypt secret #162

Closed Angrigo closed 2 years ago

Angrigo commented 5 years ago

Hello, could we have the possibility to set a bcrypt hash? I'm planning to build another login system using the same database so I need the hash to check password. Also, could you update $2y$ bcrypt prefix to $2a$ ? It seems newer

games647 commented 5 years ago

Also, could you update $2y$ bcrypt prefix to $2a$ ? It seems newer

There is actually no difference (ref). It was changed to 2y to provide compatibility with PHP.

Hello, could we have the possibility to set a bcrypt hash?

The user object has already a method to set the hash. Only afterwards the change have to be flushed to the database.