Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -98,23 +98,30 @@ The more data that you include for import, the easier we can set up your users i
### Password data (optional)

- `hashed_password` - the user’s password encrypted using a hashing method or algorithm.
- `hashing_method` - the name of the algorithm used to encrypt the user’s password. Currently **crypt**, **bcrypt**, **md5**, and **wordpress** are supported. [Contact us](https://kinde-21631392.hs-sites.com/en-au/feature-request) if you need a different method.
- `hashing_method` - the name of the algorithm used to encrypt the user’s password. Currently **crypt**, **bcrypt**, **sha256**, **md5**, and **wordpress** are supported. [Contact us](https://kinde-21631392.hs-sites.com/en-au/feature-request) if you need a different method.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Add security recommendations for hashing methods

While the documentation accurately lists the supported hashing methods, it should include security recommendations to guide users toward more secure choices.

Consider reordering the methods by security strength and adding a security note:

-Currently **crypt**, **bcrypt**, **sha256**, **md5**, and **wordpress** are supported.
+Currently supported hashing methods (ordered by security strength):
+- **bcrypt** (recommended)
+- **sha256** with salt
+- **crypt**
+- **wordpress**
+- **md5** (not recommended for new implementations due to known vulnerabilities)
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- `hashing_method` - the name of the algorithm used to encrypt the users password. Currently **crypt**, **bcrypt**, **sha256**, **md5**, and **wordpress** are supported. [Contact us](https://kinde-21631392.hs-sites.com/en-au/feature-request) if you need a different method.
- `hashing_method` - the name of the algorithm used to encrypt the user's password. Currently supported hashing methods (ordered by security strength):
- **bcrypt** (recommended)
- **sha256** with salt
- **crypt**
- **wordpress**
- **md5** (not recommended for new implementations due to known vulnerabilities)
[Contact us](https://kinde-21631392.hs-sites.com/en-au/feature-request) if you need a different method.
🧰 Tools
🪛 LanguageTool

[uncategorized] ~101-~101: A comma may be missing after the conjunctive/linking adverb ‘Currently’.
Context: ...hm used to encrypt the user’s password. Currently crypt, bcrypt, sha256, **md...

(SENT_START_CONJUNCTIVE_LINKING_ADVERB_COMMA)

- `salt` - extra characters added to passwords to make them stronger
- `salt_position` - position of salt in password string. E.g. prefix (before) or suffix (after).
- `salt_format` - format of the salt, e.g. hex, string, etc.

<Aside title="bcrypt $2b variant support:">
<Aside title="bcrypt $2b variant support:">

Please note if you are importing bcrypt hashes with the $2b variant, Kinde will substitute this for the $2a variant. These are interchangeable as long as you were not running OpenBSD at the time the hashes were generated.

</Aside>

- `salt` - extra characters added to passwords to make them stronger
- `salt_position` - position of salt in password string. Prefix (before) or suffix (after).
<Aside title="sha256 support:">

Provide the hash in hex format. Import the salt using the `salt` column. For the `salt_format`, specify how the salt should be interpreted: e.g. **hex** for a hex-encoded string (68656c6c6f for hello). By default, the salt is treated as a plain string, and escape sequences (like \n or \v) are treated as literal characters.

</Aside>
Comment on lines +112 to +116
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Add SHA256 implementation examples

The SHA256 documentation should include specific examples of hash generation and salt combination.

Consider adding implementation details:

<Aside title="sha256 support:">
-  Provide the hash in hex format. Import the salt using the `salt` column. For the `salt_format`, specify how the salt should be interpreted: e.g. **hex** for a hex-encoded string (68656c6c6f for hello). By default, the salt is treated as a plain string, and escape sequences (like \n or \v) are treated as literal characters.
+  SHA256 implementation details:
+  1. Hash format: Provide the hash in lowercase hex format (64 characters)
+  2. Salt handling:
+     - For prefix salt: SHA256(salt + password)
+     - For suffix salt: SHA256(password + salt)
+  
+  Example:
+  ```csv
+  email,hashed_password,hashing_method,salt,salt_position,salt_format
+  user@example.com,5e884898da28047151d0e56f8dc6292773603d0d6aabbdd62a11ef721d1542d8,sha256,mysalt,suffix,string
+  ```
+  This example represents: SHA256("password" + "mysalt")
</Aside>


| Hashing method | Salt | Salt position |
| -------------- | -------- | ------------------------- |
| md5 | Optional | required if salt included |
| bcrypt | | |
| crypt | Optional | |
| wordpress | Optional | |
| sha256 | Optional | required if salt included |

### **Example simple csv import**

Expand Down
Loading