Skip to content
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

[Do not merge] Feat/workflows #349

Open
wants to merge 67 commits into
base: main
Choose a base branch
from
Open

[Do not merge] Feat/workflows #349

wants to merge 67 commits into from

Conversation

clairekinde11
Copy link
Collaborator

@clairekinde11 clairekinde11 commented Feb 26, 2025

New section with new topics for the workflows feature. Testing it works.

Summary by CodeRabbit

  • Documentation

    • Added comprehensive guides for connecting repositories, creating, and managing workflows.
    • Introduced detailed examples covering various workflow scenarios including password flows, token generation, and user post-authentication.
    • Provided step-by-step instructions for previewing, troubleshooting, and securely synchronizing code.
    • Included guidance on encryption key management and deployment statuses.
  • New Features

    • Enhanced user navigation with a new "Workflows" section in the sidebar, enabling quick access to workflow resources and documentation.

Copy link
Contributor

coderabbitai bot commented Feb 26, 2025

Warning

Rate limit exceeded

@clairekinde11 has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 27 minutes and 6 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 7617846 and 081e05c.

📒 Files selected for processing (3)
  • src/content/docs/workflows/about-workflows/connect-repo-for-workflows.mdx (1 hunks)
  • src/content/docs/workflows/example-workflows/m2m-token-generation-workflow.mdx (1 hunks)
  • src/content/docs/workflows/example-workflows/new-password-provided-workflow.mdx (1 hunks)

Walkthrough

This pull request introduces a comprehensive set of new documentation files for the Kinde platform workflows. The additions include guides for connecting repositories, setting up various workflow triggers (e.g., password events, M2M token generation, post-authentication), creating and managing workflows, and troubleshooting. The update also revises the sidebar to incorporate a dedicated "Workflows" section and adds a guide for syncing Git code.

Changes

File(s) Summary
src/content/docs/workflows/about-workflows/connect-repo-for-workflows.mdx,
src/content/docs/workflows/about-workflows/index.mdx
New documentation on connecting a workflows repository and an overview of workflows, triggers, and usage guidelines.
src/content/docs/workflows/example-workflows/existing-password-provided-workflow.mdx,
src/content/docs/workflows/example-workflows/m2m-token-generation-workflow.mdx,
src/content/docs/workflows/example-workflows/new-password-provided-workflow.mdx,
src/content/docs/workflows/example-workflows/workflow-user-post-auth.mdx
New guides detailing various workflow examples including existing and new password events, M2M token generation, and user post-authentication, with security and binding details.
src/content/docs/workflows/manage-workflows/create-workflow.mdx,
src/content/docs/workflows/manage-workflows/deactivate-delete-workflow.mdx,
src/content/docs/workflows/manage-workflows/manage-code-and-deployments.mdx,
src/content/docs/workflows/manage-workflows/workflow-encryption-key.mdx,
src/content/docs/workflows/manage-workflows/workflow-logs-troubleshooting.mdx,
src/content/docs/workflows/manage-workflows/preview-workflows.mdx
New documentation covering the creation, deactivation/deletion, deployment management, encryption key handling, logs/troubleshooting, and previewing of workflows.
src/content/docs/build/set-up-options/sync-git-code.mdx New guide for syncing Git code from repositories (currently GitHub) to Kinde along with preview mode instructions.
src/data/sidebarData.ts Updated sidebar configuration to add a new "Workflows" section with sub-items for About, Examples, and Manage Workflows.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant GitHub
    participant Kinde
    User->>GitHub: Push code with kinde.json & workflow files
    User->>Kinde: Navigate to Workflows section
    User->>Kinde: Connect repository and select branch
    Kinde-->>User: Display sync confirmation & visual feedback
Loading
sequenceDiagram
    participant User
    participant Kinde
    participant WorkflowHandler
    User->>Kinde: Complete authentication
    Kinde->>WorkflowHandler: Trigger user:post_authentication event
    WorkflowHandler-->>Kinde: Process event and return updates
    Kinde-->>User: Finalize sign-in process
Loading

Suggested labels

sdk

Suggested reviewers

  • marcosmartini
  • DaveOrDead

Poem

Oh, how the docs now brightly gleam,
New workflows ready like a dream.
I hop through pages, code in tow,
Syncing repos where ideas grow.
With encryption keys and triggers chime,
My fluffy ears dance in joyful time.
Cheers from a rabbit, as we improve our rhyme!


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Nitpick comments (6)
src/content/docs/build/set-up-options/sync-git-code.mdx (1)

11-11: Clarify GitHub Branding.
Please update “Github” to “GitHub” in the introductory text to correctly reflect the brand’s proper capitalization.

src/content/docs/workflows/about-workflows/index.mdx (1)

31-34: Enhance Variety in Use-Case Descriptions.
The use-case bullet points all begin with “You want…” Consider rephrasing some items to introduce variety and improve readability.

🧰 Tools
🪛 LanguageTool

[style] ~33-~33: You have already used this phrasing in nearby sentences. Consider replacing it to add variety to your writing.
Context: ...lude it as claims in your tokens. - You want to reduce the size and weight of tokens, r...

(REP_WANT_TO_VB)


[style] ~34-~34: You have already used this phrasing in nearby sentences. Consider replacing it to add variety to your writing.
Context: ...emove things that you don’t need. - You want to change how info is rendered, for exampl...

(REP_WANT_TO_VB)

src/content/docs/workflows/example-workflows/m2m-token-generation-workflow.mdx (1)

86-126: Advanced Example: Consider Adding Error Handling.
In the advanced example code block, the retrieval of the organization code and subsequent API calls assume successful responses. Consider adding error handling to manage cases where the organization code is not found or the API requests fail.

src/content/docs/workflows/example-workflows/workflow-user-post-auth.mdx (3)

13-13: Punctuation for “e.g.” Abbreviation.
Please update “(e.g email + password or Google)” to “(e.g., email + password or Google)” for correct punctuation.

🧰 Tools
🪛 LanguageTool

[uncategorized] ~13-~13: The abbreviation “e.g.” (= for example) requires two periods.
Context: ...completed single factor authentication (e.g email + password or Google). <Aside ty...

(E_G)


15-17: Clarify Warning Message Punctuation.
At line 17, consider adding a comma after “At this stage” to improve readability (e.g., “At this stage, the user is not authorized…”).

🧰 Tools
🪛 LanguageTool

[uncategorized] ~17-~17: Possible missing comma found.
Context: ...ogle).

At this stage the user is not authorized - we have no...

(AI_HYDRA_LEO_MISSING_COMMA)


37-37: Refine “i.e.” Usage and Conciseness.
The phrase “i.e we create a new record so you can act accordingly” should be updated to “i.e., we create a new record so you can act accordingly.” Also, consider whether “new record” could be made more concise.

🧰 Tools
🪛 LanguageTool

[uncategorized] ~37-~37: The abbreviation “i.e.” (= that is) requires two periods.
Context: ...is a new user from a Kinde perspective. i.e we create a new record so you can act a...

(I_E)


[style] ~37-~37: ‘new record’ might be wordy. Consider a shorter alternative.
Context: ...om a Kinde perspective. i.e we create a new record so you can act accordingly. ## Workflo...

(EN_WORDINESS_PREMIUM_NEW_RECORD)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b624298 and 44f7692.

📒 Files selected for processing (4)
  • src/content/docs/build/set-up-options/sync-git-code.mdx (1 hunks)
  • src/content/docs/workflows/about-workflows/index.mdx (1 hunks)
  • src/content/docs/workflows/example-workflows/m2m-token-generation-workflow.mdx (1 hunks)
  • src/content/docs/workflows/example-workflows/workflow-user-post-auth.mdx (1 hunks)
🧰 Additional context used
🪛 LanguageTool
src/content/docs/workflows/about-workflows/index.mdx

[misspelling] ~19-~19: Use “a” instead of ‘an’ if the following word doesn’t start with a vowel sound, e.g. ‘a sentence’, ‘a university’.
Context: ...thorization. - m2m:token_generation - an m2m transaction fires. - `user:new_pass...

(EN_A_VS_AN)


[style] ~33-~33: You have already used this phrasing in nearby sentences. Consider replacing it to add variety to your writing.
Context: ...lude it as claims in your tokens. - You want to reduce the size and weight of tokens, r...

(REP_WANT_TO_VB)


[style] ~34-~34: You have already used this phrasing in nearby sentences. Consider replacing it to add variety to your writing.
Context: ...emove things that you don’t need. - You want to change how info is rendered, for exampl...

(REP_WANT_TO_VB)


[style] ~40-~40: This adverb was used twice in the sentence. Consider removing one of them or replacing them with a synonym.
Context: ...ch trigger can only have one workflow - Only Kinde-defined triggers are available (f...

(ADVERB_REPETITION_PREMIUM)

src/content/docs/workflows/example-workflows/workflow-user-post-auth.mdx

[uncategorized] ~13-~13: The abbreviation “e.g.” (= for example) requires two periods.
Context: ...completed single factor authentication (e.g email + password or Google). <Aside ty...

(E_G)


[uncategorized] ~17-~17: Possible missing comma found.
Context: ...ogle).

At this stage the user is not authorized - we have no...

(AI_HYDRA_LEO_MISSING_COMMA)


[style] ~31-~31: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ... user before tokens are generated. ### Add user to organizations If the user has ...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[uncategorized] ~35-~35: This adjective is normally spelled with a hyphen.
Context: ...n flow. ### Determine if the user is a first time user Users can be created in multiple ...

(TIME_HYPHEN)


[uncategorized] ~37-~37: The abbreviation “i.e.” (= that is) requires two periods.
Context: ...is a new user from a Kinde perspective. i.e we create a new record so you can act a...

(I_E)


[style] ~37-~37: ‘new record’ might be wordy. Consider a shorter alternative.
Context: ...om a Kinde perspective. i.e we create a new record so you can act accordingly. ## Workflo...

(EN_WORDINESS_PREMIUM_NEW_RECORD)


[uncategorized] ~43-~43: Possible missing comma found.
Context: ...your code is the Kinde workflow event object which has two keys request and `conte...

(AI_HYDRA_LEO_MISSING_COMMA)


[style] ~43-~43: Try using a synonym here to strengthen your writing.
Context: ... two keys request and context. This gives you access to the reason the workflow was t...

(GIVE_PROVIDE)

src/content/docs/workflows/example-workflows/m2m-token-generation-workflow.mdx

[style] ~28-~28: This phrasing can be overused. Try elevating your writing with a more formal alternative.
Context: ...plication with an organization or user If you want, you can use M2M applications similar t...

(IF_YOU_WANT)


[style] ~35-~35: Try using a synonym here to strengthen your writing.
Context: ... two keys request and context. This gives you access to the reason the workflow was t...

(GIVE_PROVIDE)

src/content/docs/build/set-up-options/sync-git-code.mdx

[uncategorized] ~18-~18: Do not mix variants of the same word (‘synch’ and ‘sync’) within a single text.
Context: ...vironment, consider selecting the Set synched code live immediately option. 5. Sele...

(EN_WORD_COHERENCY)

🔇 Additional comments (5)
src/content/docs/build/set-up-options/sync-git-code.mdx (1)

18-18: Consistent Terminology for Code Syncing.
Replace “Set synched code live immediately” with “Set synced code live immediately” to ensure consistency throughout the document (as noted in previous reviews).

🧰 Tools
🪛 LanguageTool

[uncategorized] ~18-~18: Do not mix variants of the same word (‘synch’ and ‘sync’) within a single text.
Context: ...vironment, consider selecting the Set synched code live immediately option. 5. Sele...

(EN_WORD_COHERENCY)

src/content/docs/workflows/about-workflows/index.mdx (2)

1-10: Front Matter Validation.
The YAML front matter (page_id, title, sidebar order, and relatedArticles) is correctly structured.


18-21: Verify Article Usage for M2M Trigger Description.
In the bullet “m2m:token_generation – an m2m transaction fires,” please verify that the article “an” is the intended choice. If “M2M” (pronounced “em-two-em”) is meant, then “an” is appropriate; otherwise, adjust accordingly.

🧰 Tools
🪛 LanguageTool

[misspelling] ~19-~19: Use “a” instead of ‘an’ if the following word doesn’t start with a vowel sound, e.g. ‘a sentence’, ‘a university’.
Context: ...thorization. - m2m:token_generation - an m2m transaction fires. - `user:new_pass...

(EN_A_VS_AN)

src/content/docs/workflows/example-workflows/m2m-token-generation-workflow.mdx (2)

57-72: Workflow Settings Block Looks Good.
The exported workflowSettings object is clearly defined with all the necessary fields.


80-82: Simple M2M Token Binding Example is Clear.
The concise example using kinde.m2mToken.setCustomClaim is clear and effective.

Comment on lines 37 to 53
```jsx
{
"request": {
"auth": {
"audience": ["<EXAMPLE_API>"]
},
"ip": "192.168.0.1"
},
"context": {
"domains": {
"kindeDomain": "https://example.kinde.com" // Your Kinde domain
},
"application": {
"clientId": "299627bd8bfa493f8b17e6aec8ebfb86" // the M2M application ID
}
}
```
Copy link
Contributor

@coderabbitai coderabbitai bot Feb 27, 2025

Choose a reason for hiding this comment

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

⚠️ Potential issue

JSON Example Completeness.
The JSON snippet for the event object appears to be missing a closing curly brace for the outer object. Please add the missing brace to ensure valid JSON syntax.

Copy link
Member

Choose a reason for hiding this comment

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

@clairekinde11 this is also valid

Copy link
Contributor

Choose a reason for hiding this comment

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

Seems like the humans are having a chat. I'll hop back into my burrow for now. If you need me again, just tag @coderabbitai in a new comment, and I'll come hopping out!

Comment on lines +116 to +126
export default async function handlePostAuth(event: onPreMFAEvent) {

const isNewKindeUser = event.context.auth.isNewUserRecordCreated;

// The user has been added to the Kinde user pool for the first time
if (isNewKindeUser) {
// do something
}

};
```
Copy link
Contributor

@coderabbitai coderabbitai bot Feb 27, 2025

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

⚠️ Potential issue

Correct Event Type in Function Signature.
The function handlePostAuth is currently typed as onPreMFAEvent though it belongs to the post-authentication workflow. Please update the parameter type to onPostAuthenticationEvent to match the intended trigger.

- export default async function handlePostAuth(event: onPreMFAEvent) {
+ export default async function handlePostAuth(event: onPostAuthenticationEvent) {
📝 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
export default async function handlePostAuth(event: onPreMFAEvent) {
const isNewKindeUser = event.context.auth.isNewUserRecordCreated;
// The user has been added to the Kinde user pool for the first time
if (isNewKindeUser) {
// do something
}
};
```
export default async function handlePostAuth(event: onPostAuthenticationEvent) {
const isNewKindeUser = event.context.auth.isNewUserRecordCreated;
// The user has been added to the Kinde user pool for the first time
if (isNewKindeUser) {
// do something
}
};

Copy link
Member

Choose a reason for hiding this comment

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

@clairekinde11 this is valid

Copy link
Contributor

Choose a reason for hiding this comment

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

Seems like the humans are having a chat. I'll hop back into my burrow for now. If you need me again, just tag @coderabbitai in a new comment, and I'll come hopping out!

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

♻️ Duplicate comments (1)
src/content/docs/workflows/example-workflows/existing-password-provided-workflow.mdx (1)

93-101: ⚠️ Potential issue

Widget Binding Section and Example
The widget binding explanation (lines 93–102) is succinct. However, in the example code on line 106, the property is referenced as context.auth.Password (with a capital “P”). For consistency with the previous usage (which uses lowercase password), please verify the correct casing.

-const isMinCharacters = context.auth.Password.length >= 50;
+const isMinCharacters = context.auth.password.length >= 50;
🧰 Tools
🪛 LanguageTool

[style] ~95-~95: Try using a synonym here to strengthen your writing.
Context: ...get binding The kinde.widget binding gives you access to the Kinde widget, which is th...

(GIVE_PROVIDE)


[formatting] ~95-~95: Consider inserting a comma after an introductory phrase for better readability.
Context: ... which is the central form on the page. In this case the form with the two password fields. ...

(IN_THAT_CASE_COMMA)

🧹 Nitpick comments (13)
src/content/docs/workflows/manage-workflows/deactivate-delete-workflow.mdx (1)

26-29: Delete Workflow Explanation – Style & Punctuation
The explanation under “Delete workflow files in your repo” (lines 26–29) would benefit from a slight rephrasing and a comma for clarity. For example, consider updating line 28 as follows:

-Even when you delete the workflow from your repo it will remain in Kinde. This is to safeguard against error and to protect your auth flow. The workflow keeps running until you manually delete it.
+Even when you delete the workflow files from your repo, the workflow remains active in Kinde to safeguard against accidental deletions and to protect your authentication flow. It will continue running until you manually delete it.

This change improves clarity and formality.

🧰 Tools
🪛 LanguageTool

[uncategorized] ~28-~28: Possible missing comma found.
Context: ... when you delete the workflow from your repo it will remain in Kinde. This is to saf...

(AI_HYDRA_LEO_MISSING_COMMA)


[style] ~28-~28: To elevate your writing, try using more formal phrasing here.
Context: ...to protect your auth flow. The workflow keeps running until you manually delete it. ### 2: D...

(CONTINUE_TO_VB)

src/content/docs/workflows/about-workflows/index.mdx (3)

13-17: Triggers Listing Clarity
The list of available triggers is clearly enumerated. One minor suggestion: double-check that the dash notation (–) is used consistently between the triggers (e.g. consider “fires” vs. “– when …”) to maintain stylistic consistency.


23-26: When to Use a Workflow – Grammar Improvement
The “When to use a workflow” section effectively lists scenarios. In line 24, the phrase “customize an access or ID tokens” is a bit off grammatically.
Suggested revision:

- - You want to customize an access or ID tokens in ways that we don’t support out of the box.
+ - You want to customize access or ID tokens in ways that we don’t support out of the box.

This change removes the extra article.


32-33: Explanation of Methods and Code Helpers
The brief description directing users to the Infrastructure repo is clear. If similar phrasing has been used elsewhere in the documentation, consider a slight rewording for variety.

🧰 Tools
🪛 LanguageTool

[style] ~33-~33: You have already used this phrasing in nearby sentences. Consider replacing it to add variety to your writing.
Context: ...lude it as claims in your tokens. - You want to reduce the size and weight of tokens, r...

(REP_WANT_TO_VB)

src/content/docs/workflows/manage-workflows/create-workflow.mdx (2)

17-23: Add a Workflow File – Clarity and Grammar
The instructions for adding a workflow file are very useful. A couple of improvements are recommended:

  1. In line 19, the sentence “In the Kinde infrastructure folder, you set up (e.g. [RootFolder]/environment/workflows) create a TypeScript file.” can be rephrased for grammatical clarity.
    Suggested revision:
    -In the Kinde infrastructure folder, you set up (e.g. `[RootFolder]/environment/workflows`) create a TypeScript file. You can name it anything ending in `...Workflow.ts`.
    +In the Kinde infrastructure folder (e.g., `[RootFolder]/environment/workflows`), create a TypeScript file. You can name it anything that ends with `...Workflow.ts`.
  2. In line 21, add a comma after “For example” to match common style guidelines.
    -For example if the Kinde workflow name is `Custom-access-token`, the filename could be `CustomAccessTokenWorkflow.ts.`
    +For example, if the Kinde workflow name is `Custom-access-token`, the filename could be `CustomAccessTokenWorkflow.ts.`
🧰 Tools
🪛 LanguageTool

[typographical] ~21-~21: After the expression ‘for example’ a comma is usually used.
Context: ...ding in ...Workflow.ts. For example if the Kinde workflow name is `Custom-a...

(COMMA_FOR_EXAMPLE)


26-33: Making the Workflow Live – Minor Typo
In step 1 of “Make the workflow live (for the first time)” (line 28), “Got to Workflows” appears to be a typo. It should read “Go to Workflows.”

-1. Got to **Workflows** and click on the workflow trigger.
+1. Go to **Workflows** and click on the workflow trigger.
src/content/docs/workflows/example-workflows/existing-password-provided-workflow.mdx (2)

24-26: Example Use Case – Drip Feed Migration
The “Drip feed migration” example (lines 24–26) introduces a practical scenario. Consider rephrasing the sentence for grammatical completeness. For example:

-For gradual migrations to Kinde where you wish to check the password against an external database before creating the user in Kinde. 
+For gradual migrations to Kinde, you can check the password against an external database before creating the user in Kinde.

78-91: Secure Fetch Code Example – Placeholder Improvement
Within the code example, the endpoint placeholder is written as:

const response = await kinde.secureFetch(`<YOUR_EXTERNAL_PASSWORD_DATABASE_ENDPOINT`, {});

It is suggested to include a closing angle bracket for improved clarity:

-const response = await kinde.secureFetch(`<YOUR_EXTERNAL_PASSWORD_DATABASE_ENDPOINT`, {
+const response = await kinde.secureFetch(`<YOUR_EXTERNAL_PASSWORD_DATABASE_ENDPOINT>`, {
src/content/docs/workflows/about-workflows/connect-repo-for-workflows.mdx (2)

39-40: Duplicate Step Numbering in Connection Instructions
There are two steps numbered “6.” (lines 39 and 40). For clarity and consistency, update the step numbering (for example, change the second “6.” to “7.”).

Example diff suggestion:

-6. Check if your code has synced to Kinde. Go to **Home > Workflows**. If you already have workflow files set up, the workflows will appear in **Workflows** page. If we failed to read your workflow code, you should see a warning.
+7. Check if your code has synced to Kinde. Go to **Home > Workflows**. If you already have workflow files set up, the workflows will appear in **Workflows** page. If we failed to read your workflow code, you should see a warning.

47-51: Typographical Error in Warning Block
There is a minor typo on line 49: “automatcially” should be “automatically”.

Example diff suggestion:

-If the preview code option is switched off, your code will be pushed live automatcially each time you sync.
+If the preview code option is switched off, your code will be pushed live automatically each time you sync.
src/content/docs/workflows/example-workflows/m2m-token-generation-workflow.mdx (3)

33-35: Wording Improvement for Event Object Description
The sentence “This gives you access to the reason the workflow was triggered.” could be strengthened by using more formal language. For example, consider: “This provides access to the context explaining why the workflow was triggered.”

🧰 Tools
🪛 LanguageTool

[uncategorized] ~35-~35: Possible missing comma found.
Context: ...your code is the Kinde workflow event object which has two keys request and `conte...

(AI_HYDRA_LEO_MISSING_COMMA)


[style] ~35-~35: Try using a synonym here to strengthen your writing.
Context: ... two keys request and context. This gives you access to the reason the workflow was t...

(GIVE_PROVIDE)


27-29: Consider Refining the Custom Claims Section Wording
The sentence “If you want, you can use M2M applications similar to API keys to enable access to various endpoints and tie them to an organization or user.” could be refined for enhanced clarity and formality. For example, consider “M2M applications can be used similarly to API keys to facilitate access to various endpoints while associating them with a specific organization or user.”

🧰 Tools
🪛 LanguageTool

[style] ~28-~28: This phrasing can be overused. Try elevating your writing with a more formal alternative.
Context: ...plication with an organization or user If you want, you can use M2M applications similar t...

(IF_YOU_WANT)


107-129: Optional: Validate Property Existence in Advanced Example
Within the advanced example’s handleM2M function, ensure that the orgCode is properly validated before accessing orgCode.value to avoid potential runtime errors if the property is missing.

If needed, consider adding a fallback or an error message when orgCode is undefined.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 44f7692 and 74433e9.

📒 Files selected for processing (8)
  • src/content/docs/workflows/about-workflows/connect-repo-for-workflows.mdx (1 hunks)
  • src/content/docs/workflows/about-workflows/index.mdx (1 hunks)
  • src/content/docs/workflows/example-workflows/existing-password-provided-workflow.mdx (1 hunks)
  • src/content/docs/workflows/example-workflows/m2m-token-generation-workflow.mdx (1 hunks)
  • src/content/docs/workflows/example-workflows/new-password-provided-workflow.mdx (1 hunks)
  • src/content/docs/workflows/manage-workflows/create-workflow.mdx (1 hunks)
  • src/content/docs/workflows/manage-workflows/deactivate-delete-workflow.mdx (1 hunks)
  • src/content/docs/workflows/manage-workflows/manage-code-and-deployments.mdx (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/content/docs/workflows/manage-workflows/manage-code-and-deployments.mdx
🧰 Additional context used
🪛 LanguageTool
src/content/docs/workflows/example-workflows/existing-password-provided-workflow.mdx

[style] ~32-~32: Try using a synonym here to strengthen your writing.
Context: ... two keys request and context. This gives you access to the reason the workflow was t...

(GIVE_PROVIDE)


[uncategorized] ~76-~76: Use a comma before ‘so’ if it connects two independent clauses (unless they are closely connected and short).
Context: ...word. We handle the encryption for you so your code might look like: ```jsx cons...

(COMMA_COMPOUND_SENTENCE_2)


[style] ~95-~95: Try using a synonym here to strengthen your writing.
Context: ...get binding The kinde.widget binding gives you access to the Kinde widget, which is th...

(GIVE_PROVIDE)


[formatting] ~95-~95: Consider inserting a comma after an introductory phrase for better readability.
Context: ... which is the central form on the page. In this case the form with the two password fields. ...

(IN_THAT_CASE_COMMA)

src/content/docs/workflows/about-workflows/index.mdx

[style] ~33-~33: You have already used this phrasing in nearby sentences. Consider replacing it to add variety to your writing.
Context: ...lude it as claims in your tokens. - You want to reduce the size and weight of tokens, r...

(REP_WANT_TO_VB)


[style] ~34-~34: You have already used this phrasing in nearby sentences. Consider replacing it to add variety to your writing.
Context: ...emove things that you don’t need. - You want to change the data type of a claim. For ex...

(REP_WANT_TO_VB)


[grammar] ~34-~34: If ‘type’ is a classification term, ‘a’ is not necessary. Use “type of”. (The phrases ‘kind of’ and ‘sort of’ are informal if they mean ‘to some extent’.)
Context: ...n’t need. - You want to change the data type of a claim. For example changing from an arr...

(KIND_OF_A)


[typographical] ~34-~34: After the expression ‘for example’ a comma is usually used.
Context: ...to change the data type of a claim. For example changing from an array to a space delim...

(COMMA_FOR_EXAMPLE)


[style] ~41-~41: This adverb was used twice in the sentence. Consider removing one of them or replacing them with a synonym.
Context: ...ch trigger can only have one workflow - Only Kinde-defined triggers are available (f...

(ADVERB_REPETITION_PREMIUM)

src/content/docs/workflows/example-workflows/m2m-token-generation-workflow.mdx

[style] ~28-~28: This phrasing can be overused. Try elevating your writing with a more formal alternative.
Context: ...plication with an organization or user If you want, you can use M2M applications similar t...

(IF_YOU_WANT)


[uncategorized] ~35-~35: Possible missing comma found.
Context: ...your code is the Kinde workflow event object which has two keys request and `conte...

(AI_HYDRA_LEO_MISSING_COMMA)


[style] ~35-~35: Try using a synonym here to strengthen your writing.
Context: ... two keys request and context. This gives you access to the reason the workflow was t...

(GIVE_PROVIDE)

src/content/docs/workflows/example-workflows/new-password-provided-workflow.mdx

[typographical] ~32-~32: It appears that a comma is missing.
Context: ...00,000 most common passwords With this workflow you can add your own custom code to run...

(DURING_THAT_TIME_COMMA)


[typographical] ~38-~38: It appears that a comma is missing.
Context: ...y mobile app password store. With this workflow you can securely send the password to y...

(DURING_THAT_TIME_COMMA)


[style] ~38-~38: Consider a shorter alternative to avoid wordiness.
Context: ... the password to your mobile app system in order to keep them in sync. ## Workflow code #...

(IN_ORDER_TO_PREMIUM)


[style] ~44-~44: Try using a synonym here to strengthen your writing.
Context: ... two keys request and context. This gives you access to the reason the workflow was t...

(GIVE_PROVIDE)


[uncategorized] ~88-~88: Use a comma before ‘so’ if it connects two independent clauses (unless they are closely connected and short).
Context: ...word. We handle the encryption for you so your code might look like: ```jsx cons...

(COMMA_COMPOUND_SENTENCE_2)


[style] ~106-~106: Try using a synonym here to strengthen your writing.
Context: ...get binding The kinde.widget binding gives you access to the Kinde widget which is the...

(GIVE_PROVIDE)


[formatting] ~106-~106: Consider inserting a comma after an introductory phrase for better readability.
Context: ... which is the central form on the page. In this case the form with the two password fields. ...

(IN_THAT_CASE_COMMA)

src/content/docs/workflows/manage-workflows/create-workflow.mdx

[typographical] ~21-~21: After the expression ‘for example’ a comma is usually used.
Context: ...ding in ...Workflow.ts. For example if the Kinde workflow name is `Custom-a...

(COMMA_FOR_EXAMPLE)

src/content/docs/workflows/manage-workflows/deactivate-delete-workflow.mdx

[style] ~20-~20: You have already used this phrasing in nearby sentences. Consider replacing it to add variety to your writing.
Context: ...ct Deactivate. 4. Confirm that you want to deactivate. The workflow will be stoppe...

(REP_WANT_TO_VB)


[uncategorized] ~28-~28: Possible missing comma found.
Context: ... when you delete the workflow from your repo it will remain in Kinde. This is to saf...

(AI_HYDRA_LEO_MISSING_COMMA)


[style] ~28-~28: To elevate your writing, try using more formal phrasing here.
Context: ...to protect your auth flow. The workflow keeps running until you manually delete it. ### 2: D...

(CONTINUE_TO_VB)

🔇 Additional comments (25)
src/content/docs/workflows/manage-workflows/deactivate-delete-workflow.mdx (5)

1-9: Metadata Block OK
The YAML front matter is well formatted and provides the required metadata (page_id, title, sidebar order, and relatedArticles).


11-12: Introduction Clarity
The opening sentence clearly outlines that there is a difference between deactivating and deleting a workflow. This sets a good context for the reader.


13-21: Deactivate Workflow Section Review
The “Deactivate a workflow” section is concise and the step-by-step instructions (steps 1–4) are clear. The description of how deactivation prevents further triggering until a new deployment is made is helpful.

🧰 Tools
🪛 LanguageTool

[style] ~20-~20: You have already used this phrasing in nearby sentences. Consider replacing it to add variety to your writing.
Context: ...ct Deactivate. 4. Confirm that you want to deactivate. The workflow will be stoppe...

(REP_WANT_TO_VB)


32-35: Delete Workflow in Kinde Instructions
The instructions for deleting a workflow in Kinde (lines 32–35) are clear. The phrase “explaining what is about to happen” has been corrected per previous feedback.


36-40: Aside Note – Confirmation of Restoration Behavior
The aside (lines 36–40) succinctly explains that a workflow will reappear if the workflow files are restored in the repository. This useful note reinforces the safety mechanism.

src/content/docs/workflows/about-workflows/index.mdx (2)

1-10: Front Matter & Metadata Check
The front matter is complete and well organized. The page_id, title, sidebar order, and relatedArticles are properly set.


11-12: Introduction Overview
The introduction effectively explains the power and flexibility of workflows in Kinde. The style is engaging while remaining informative.

src/content/docs/workflows/manage-workflows/create-workflow.mdx (3)

1-11: Front Matter Verification
The metadata block is complete and correctly structured.


13-15: Overview Text Review
The introductory lines (13–15) describe what a workflow is and under which conditions it appears in Kinde. The explanation is clear and sets the stage for the instructions that follow.


24-25: Workflow Draft and Deployment Instructions
The explanation about the commit status as ‘Draft’ and the subsequent instructions on making the workflow live are clear and informative.

src/content/docs/workflows/example-workflows/existing-password-provided-workflow.mdx (5)

1-9: Front Matter and Trigger Declaration
The metadata and trigger declaration (lines 1–9 and line 11) are well constructed. The title, sidebar order, and relatedArticles are correctly set up.


15-21: Security Considerations Section
The security considerations section clearly communicates that logging passwords is prevented and API calls must use the secureFetch method. This is concise and maintains best security practices.


30-33: Event Object Explanation
The explanation of the event object (lines 30–32) is clear and the following code block (lines 33–51) illustrates the structure well.

🧰 Tools
🪛 LanguageTool

[style] ~32-~32: Try using a synonym here to strengthen your writing.
Context: ... two keys request and context. This gives you access to the reason the workflow was t...

(GIVE_PROVIDE)


53-68: Workflow Settings Code Block
The code block defining workflowSettings is straightforward and accurate. The configuration values (id, name, failurePolicy, trigger, bindings) are well detailed.


70-77: Secure Fetch Binding Explanation
The secure fetch binding section (lines 70–77) clearly explains its purpose. However, in the accompanying code example (lines 78–91) a minor suggestion is offered below.

🧰 Tools
🪛 LanguageTool

[uncategorized] ~76-~76: Use a comma before ‘so’ if it connects two independent clauses (unless they are closely connected and short).
Context: ...word. We handle the encryption for you so your code might look like: ```jsx cons...

(COMMA_COMPOUND_SENTENCE_2)

src/content/docs/workflows/example-workflows/new-password-provided-workflow.mdx (8)

1-9: Front Matter and Trigger Declaration
The metadata and the trigger declaration (lines 1–9 and line 11) are properly defined.


13-21: Security Considerations Consistency
The security considerations for the new password provided workflow are consistent with other workflow documents. The details on redaction of password logging and use of secureFetch are clear.


23-32: Example Use Cases – Clarity and Formatting
The “Example use cases” section is well organized. The list under “Custom password strength policy” is clear, and the following section for syncing with an external system is explained in a step-by-step format.

🧰 Tools
🪛 LanguageTool

[typographical] ~32-~32: It appears that a comma is missing.
Context: ...00,000 most common passwords With this workflow you can add your own custom code to run...

(DURING_THAT_TIME_COMMA)


41-45: Event Object Explanation and Code Block
The description of the event object is clear, and the accompanying code block (lines 47–63) effectively illustrates the structure.

🧰 Tools
🪛 LanguageTool

[style] ~44-~44: Try using a synonym here to strengthen your writing.
Context: ... two keys request and context. This gives you access to the reason the workflow was t...

(GIVE_PROVIDE)


65-80: Workflow Settings Code Block
The workflowSettings object is defined correctly with all necessary fields. The code block is clear and adheres to the standards set in earlier workflow examples.


82-88: Secure Fetch Binding Overview
The explanation regarding secure fetch (lines 82–88) is clear and provides good context regarding encryption and key management.

🧰 Tools
🪛 LanguageTool

[uncategorized] ~88-~88: Use a comma before ‘so’ if it connects two independent clauses (unless they are closely connected and short).
Context: ...word. We handle the encryption for you so your code might look like: ```jsx cons...

(COMMA_COMPOUND_SENTENCE_2)


104-112: Widget Binding Section – Consistency and Clarity
The widget binding explanation and its code example (lines 104–112) are clear and consistent with previous workflow documents.

🧰 Tools
🪛 LanguageTool

[style] ~106-~106: Try using a synonym here to strengthen your writing.
Context: ...get binding The kinde.widget binding gives you access to the Kinde widget which is the...

(GIVE_PROVIDE)


[formatting] ~106-~106: Consider inserting a comma after an introductory phrase for better readability.
Context: ... which is the central form on the page. In this case the form with the two password fields. ...

(IN_THAT_CASE_COMMA)


113-132: Workflow Field Names Table
The table listing the field names is well formatted and provides clear documentation on what each field represents.

src/content/docs/workflows/about-workflows/connect-repo-for-workflows.mdx (2)

1-10: Frontmatter Block Verification
The YAML frontmatter (lines 1–10) is well structured and includes all the required metadata.


18-18: Duplicate Comment on Directory Hint
The sentence “This tells Kinde where your custom code lives. If you prefer to use an alternative directory you can change kindeSrc to something else.” mirrors previous feedback (e.g., DaveOrDead’s note). Consider acknowledging that the guidance remains consistent.

Copy link

❌ Link Validation Failed

Invalid Links:
Link: /workflows/manage-workflows/test-workflows/, Found In: /build/set-up-options/sync-git-code.mdx
Link: /workflows/manage-workflows/test-workflows/, Found In: /workflows/about-workflows/connect-repo-for-workflows.mdx

Copy link

❌ Link Validation Failed

Invalid Links:
Link: /workflows/manage-workflows/test-workflows/, Found In: /build/set-up-options/sync-git-code.mdx
Link: /workflows/manage-workflows/test-workflows/, Found In: /workflows/about-workflows/connect-repo-for-workflows.mdx

Copy link

❌ Link Validation Failed

Invalid Links:
Link: /workflows/manage-workflows/test-workflows/, Found In: /build/set-up-options/sync-git-code.mdx
Link: /workflows/manage-workflows/test-workflows/, Found In: /workflows/about-workflows/connect-repo-for-workflows.mdx

clairekinde11 and others added 3 commits March 2, 2025 16:34
…ion-workflow.mdx

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (6)
src/content/docs/workflows/manage-workflows/preview-workflows.mdx (1)

17-17: Typographical Suggestion: Insert Comma
Consider revising the sentence:

"For this you need to get the Workflow deployment ID and password from Kinde."
to
"For this, you need to get the Workflow deployment ID and password from Kinde."
This small change improves readability.

🧰 Tools
🪛 LanguageTool

[typographical] ~17-~17: Use a comma after an introductory phrase.
Context: ...y testing one of your code deployments. For this you need to get the Workflow deployment...

(COMMA_INTRODUCTORY_WORDS_PHRASES)

src/content/docs/workflows/about-workflows/connect-repo-for-workflows.mdx (5)

16-19: Repository Setup Instructions Clarity
The instructions are clear; however, in the phrase:

"In the root of the repo create a file called kinde.json with the content:"
consider inserting a comma after "In the root of the repo" to read:
"In the root of the repo, create a file called kinde.json with the content:"
This will enhance clarity.


22-26: Code Block Language Specification
The code block contains JSON content but is annotated as jsx. Changing the language specifier to json could improve syntax highlighting and clarity.

Consider updating as follows:

-    ```jsx
+    ```json

30-40: Connectivity Instructions Evaluation
The steps for connecting the repo and branch are detailed and informative. Note that items in the numbered list are misnumbered: steps 6 appear twice (lines 39 and 40). Adjusting the numbering (for example, making the second "6" a "7") will improve readability.


44-45: Phrasing Consistency in Resync Instructions
In step 8, consider revising "at anytime" to "at any time" for enhanced clarity.


47-51: Typographical Correction in Aside Block
There is a minor typo in the warning aside. Replace "automatcially" with "automatically".

Consider applying the following diff:

-automatcially
+automatically
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 755644d and 7617846.

📒 Files selected for processing (3)
  • src/content/docs/build/set-up-options/sync-git-code.mdx (1 hunks)
  • src/content/docs/workflows/about-workflows/connect-repo-for-workflows.mdx (1 hunks)
  • src/content/docs/workflows/manage-workflows/preview-workflows.mdx (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/content/docs/build/set-up-options/sync-git-code.mdx
🧰 Additional context used
🪛 LanguageTool
src/content/docs/workflows/about-workflows/connect-repo-for-workflows.mdx

[uncategorized] ~20-~20: Possible missing comma found.
Context: ... something else. 1. In the root of the repo create a file called kinde.json with ...

(AI_HYDRA_LEO_MISSING_COMMA)

src/content/docs/workflows/manage-workflows/preview-workflows.mdx

[typographical] ~17-~17: Use a comma after an introductory phrase.
Context: ...y testing one of your code deployments. For this you need to get the Workflow deployment...

(COMMA_INTRODUCTORY_WORDS_PHRASES)

🔇 Additional comments (5)
src/content/docs/workflows/manage-workflows/preview-workflows.mdx (3)

1-9: Validate Front Matter Configuration
The YAML metadata (page_id, title, sidebar order, and relatedArticles) is well structured and clearly defined.


11-15: Aside Note Integration
The aside note using <Aside type="upgrade"> appropriately highlights plan eligibility for previewing workflows.


19-29: Workflow Testing Instructions Clarity
The step-by-step instructions for copying workflow testing details are clear and concise. Ensure consistency with similar documentation sections if applicable.

src/content/docs/workflows/about-workflows/connect-repo-for-workflows.mdx (2)

1-10: Validate Front Matter Configuration
The YAML front matter is properly defined with essential metadata including page_id, title, sidebar order, and relatedArticles.


12-14: Introductory Content Evaluation
The introductory paragraphs effectively communicate the intent to give users control over their code while syncing with Kinde.

…ided-workflow.mdx

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants