以 PHC 格式导出密码哈希

@angus,我们正在这里清理一些内容。

OP 代码块是否应该如下所示:

SELECT id, username,
  concat(
    '$pbkdf2-sha256$i=64000,l=32$',
    replace(encode(users.salt::bytea, 'base64'), '=', ''),
    '$',
    replace(encode(decode(password_hash, 'hex'), 'base64'), '=', '')
  ) as phc
FROM users

并包含类似以下内容:

有关将 Discourse 密码导入 Auth0 的更多信息,请参阅 https://community.auth0.com/t/bulk-user-import-custom-password-hash-issue/47408。

要将数据从 Auth0 迁移到 Discourse,这可能会有所帮助:https://meta.discourse.org/t/migrated-password-hashes-support/19512。

3 个赞