-
Notifications
You must be signed in to change notification settings - Fork 447
Add documentation for displaying the TOTP secret key during enrollment in IS 7.1 #6301
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,8 +11,8 @@ | |
| !!! note | ||
| TOTP authenticators use the [TOTP specification](https://datatracker.ietf.org/doc/html/rfc6238){:target="_blank"} to calculate access tokens based on the current time and the secret key shared between the user and the identity provider. | ||
|
|
||
| ## Prerequisites | ||
|
Check failure on line 14 in en/includes/guides/authentication/mfa/add-totp-login.md
|
||
| - To get started, you need to [register an application with {{ product_name }}]({{base_path}}/guides/applications/). You can register your own application or use one of the [sample applications]({{base_path}}/get-started/try-samples/) provided. | ||
|
Check failure on line 15 in en/includes/guides/authentication/mfa/add-totp-login.md
|
||
|
|
||
| - Download and install one of the authenticator apps mentioned above. | ||
|
|
||
|
|
@@ -95,7 +95,7 @@ | |
|
|
||
| !!! note "Enable enrolling in TOTP at first login" | ||
| To enable enrolling in TOTP the first time a user logs in, use any of the following approaches: | ||
|
|
||
|
Check failure on line 98 in en/includes/guides/authentication/mfa/add-totp-login.md
|
||
| - Update the value of `enrolUserInAuthenticationFlow` parameter to `true`. | ||
| ```js | ||
| var enrolUserInAuthenticationFlow = "true"; | ||
|
|
@@ -104,7 +104,7 @@ | |
|
|
||
| 4. Click **Update** to save your changes. | ||
|
|
||
| {% if product_name == "WSO2 Identity Server" and is_version == "7.2.0" %} | ||
| {% if product_name == "WSO2 Identity Server" and (is_version == "7.2.0" or is_version == "7.1.0") %} | ||
|
|
||
| ## Display the secret key during enrollment | ||
|
|
||
|
|
@@ -118,7 +118,11 @@ | |
| ``` | ||
|
|
||
| !!! note | ||
| {% if is_version == "7.2.0" %} | ||
| This configuration is available from update level **7.2.0.27** onwards. | ||
| {% elif is_version == "7.1.0" %} | ||
|
Check warning on line 123 in en/includes/guides/authentication/mfa/add-totp-login.md
|
||
| This configuration is available from update level **7.1.0.100** onwards. | ||
|
Check warning on line 124 in en/includes/guides/authentication/mfa/add-totp-login.md
|
||
| {% endif %} | ||
|
|
||
| When enabled, users will see the secret key alongside the QR code during TOTP enrollment: | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
Repository: wso2/docs-is
Length of output: 1910
🌐 Web query:
Vale linter conditional directives ignore {% if elif endif {% raw %}💡 Result:
To ignore template-based conditional directives (such as {% if %}, {% elif %}, {% endif %}) in Vale, you can use the TokenIgnores configuration option in your.vale.ini file [1][2]. Because these directives are typically inline-level patterns, TokenIgnores is the appropriate mechanism to prevent Vale from linting their content [2]. Add the following to your.vale.ini file to ignore these tags: [.md] TokenIgnores = ({%.+?%}) Explanation: 1. TokenIgnores: This configuration accepts a list of regular expressions that match the tokens you wish to exclude from linting [1][2]. The pattern ({%.+?%}) captures Liquid-style or template-style tags starting with {% and ending with %} [1]. 2. Scope: You can apply this to specific file formats (like [.md] or [.mdx]) to ensure it only runs where those directives exist [1][3]. 3. BlockIgnores: If your directives span multiple lines or wrap large blocks of text that you want to ignore entirely, use BlockIgnores with a multiline regex (using the (?s) flag) [4][1]. For example: BlockIgnores = (?s){% if.? %}.*?{% endif %} Additionally, if you need to ignore these sections only in specific parts of a document, you can use inline comment controls within your source file [5][6]: {% if condition %}... some content to ignore... {% endif %} This turns off linting entirely for the duration of the block [5]. Ensure you have the proper comment syntax enabled for your specific file format [7][3].
Citations:
🌐 Web query:
Vale linter token ignores value {%if.*?%} regex parentheses💡 Result:
In Vale, the TokenIgnores configuration allows you to exclude inline-level text patterns from being linted [1][2]. To correctly ignore patterns that include special characters like parentheses or braces (such as {%... %}), you must define a regular expression that captures the entire token within the first grouping [1][2][3]. For patterns like {%... %}, you can use the following configuration in your.vale.ini file: [*.md] TokenIgnores = ({%.+?%}) Key considerations for using TokenIgnores: 1. Capture Groups: The regex must capture the entire desired ignore-string in the first capture group [1][3]. 2. Format Support: TokenIgnores are only supported for markup formats that are converted to HTML (e.g., Markdown, reStructuredText, AsciiDoc, and Org Mode) [1][2][4]. 3. Special Characters: If your pattern contains characters that have special meaning in regex, such as curly braces or dollar signs, you must escape them (e.g., {, }, $) or ensure the pattern is accurately defined to match the literal characters [3][5]. 4. Embedded Formats: If you are trying to use TokenIgnores in a file type that is not natively supported (like.js or.jl), you must first assign an embedded markup format (e.g., [formats] js = md) in your configuration for the ignores to take effect [6][4][7]. If your regex seems to have no effect, ensure that the file format is correctly recognized and supported, and verify your capture group matches the intended token entirely [6][4][8].
Citations:
TokenIgnoresdoes not seem to be taking effect vale-cli/vale#711🏁 Script executed:
Repository: wso2/docs-is
Length of output: 1910
Resolve the remaining Vale warning in the availability note.
Configure Vale to ignore template directives or add
elifto the accepted vocabulary. Replaceonwardswithand later, then runvale en/includes/guides/authentication/mfa/add-totp-login.mdwith no warnings.🧰 Tools
🪛 GitHub Check: Vale style check
[warning] 124-124:
[vale] reported by reviewdog 🐶
Did you really mean 'onwards'?
Raw Output:
{"message":"Did you really mean 'onwards'?","location":{"path":"en/includes/guides/authentication/mfa/add-totp-login.md","range":{"start":{"line":124,"column":69},"end":{"line":124,"column":76}}},"severity":"WARNING","code":{"value":"Vale.Spelling"}}
[warning] 123-123:
[vale] reported by reviewdog 🐶
Did you really mean 'elif'?
Raw Output:
{"message":"Did you really mean 'elif'?","location":{"path":"en/includes/guides/authentication/mfa/add-totp-login.md","range":{"start":{"line":123,"column":4},"end":{"line":123,"column":8}}},"severity":"WARNING","code":{"value":"Vale.Spelling"}}
🤖 Prompt for AI Agents
Sources: Coding guidelines, Linters/SAST tools