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

fix: fix keepAlive parameter error #4194

Merged
merged 3 commits into from
Aug 19, 2024
Merged

fix: fix keepAlive parameter error #4194

merged 3 commits into from
Aug 19, 2024

Conversation

anncwb
Copy link
Collaborator

@anncwb anncwb commented Aug 19, 2024

Description

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update
  • Please, don't make changes to pnpm-lock.yaml unless you introduce a new test example.

Checklist

ℹ️ Check all checkboxes - this will indicate that you have done everything in accordance with the rules in CONTRIBUTING.

  • If you introduce new functionality, document it. You can run documentation with pnpm run docs:dev command.
  • Run the tests with pnpm test.
  • Changes in changelog are generated from PR name. Please, make sure that it explains your changes in an understandable manner. Please, prefix changeset messages with feat:, fix:, perf:, docs:, or chore:.
  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

Summary by CodeRabbit

  • New Features

    • Enhanced JWT utility functions for token generation and verification with improved readability (note: hardcoded secrets present).
    • Added new property colorBorderSecondary to design tokens for better styling options.
    • Introduced a new utility function for standardized error handling in promises.
    • New build scripts for targeted component builds, enhancing clarity in the build process.
    • Added flexibility in the layout-header component with a new toggle-button slot.
  • Bug Fixes

    • Updated styling for destructive action buttons to improve visibility.
    • Renamed method in the tabbar store to handle multiple tab updates.
  • Style

    • Adjustments to CSS for dark mode and minor styling changes in UI components for better layout and spacing.
  • Documentation

    • Updated installation instructions and clarified usage for the Mock service in the documentation.
  • Chores

    • Modified various import paths for consistency across components.

@anncwb anncwb requested review from vince292007 and a team as code owners August 19, 2024 15:23
Copy link

changeset-bot bot commented Aug 19, 2024

⚠️ No Changeset found

Latest commit: c4b4564

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Contributor

coderabbitai bot commented Aug 19, 2024

Walkthrough

The recent changes enhance various components of the codebase, focusing on improving security, updating documentation, and refining UI elements. Key alterations include the transition from environment variables to hardcoded secrets for JWT handling, the addition of new build scripts, and adjustments to CSS variables for better visual clarity. Overall, these modifications aim to streamline functionality, enhance user experience, and maintain code reliability.

Changes

Files/Directory Change Summary
apps/backend-mock/utils/jwt-utils.ts Updated JWT functions to use hardcoded constants for secrets, replacing environment variables, raising security concerns.
docs/src/guide/introduction/thin.md Modified documentation for Mock service and installation dependencies, clarified folder removal, and added new build scripts for various components.
packages/@core/base/design/src/design-tokens/dark/index.css Changed --destructive color variable for improved UI styling.
packages/@core/base/design/src/design-tokens/default/index.css Modified --destructive variable to enhance button visibility.
packages/@core/base/shared/src/utils/index.ts Added export statement for to module, increasing module functionality.
packages/@core/base/shared/src/utils/to.ts Introduced to function for improved promise handling with standardized error management.
packages/@core/ui-kit/layout-ui/src/components/layout-header.vue Removed certain properties and functions; added toggle-button slot for enhanced flexibility.
packages/@core/ui-kit/layout-ui/src/vben-layout.vue Renamed header toggle function and updated template for new slot integration.
packages/@core/ui-kit/menu-ui/src/components/*.vue Updated import paths from ../interface to ../types in multiple components for consistency.
packages/effects/hooks/src/use-design-tokens.ts Added colorBorderSecondary property to design tokens for enhanced styling.
packages/stores/src/modules/tabbar.ts Renamed updateCacheTab method to updateCacheTabs to reflect updated functionality for multiple tabs.
playground/.env Renamed VITE_APP_NAMESPACE variable from vben-web-antd to vben-web-play.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant JWTService
    participant OtherComponents

    User->>JWTService: Request JWT
    JWTService-->>User: Return Access Token
    User->>OtherComponents: Use Access Token
Loading
sequenceDiagram
    participant User
    participant TabbarStore
    participant UI

    User->>TabbarStore: Update multiple tabs
    TabbarStore-->>UI: Refresh tab view
Loading

🐰 In the garden where code does bloom,
I hop with joy, dispelling gloom.
Secrets now tucked away with care,
New scripts added, a breath of fresh air.
UI shines bright in colors bold,
Changes abound, a sight to behold! 🌼


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>.
    • 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 generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @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 as 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 resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

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.

@anncwb anncwb changed the title fix: fix known issues fix: fix keepAlive parameter error Aug 19, 2024
@anncwb anncwb added the bug Something isn't working label Aug 19, 2024
@anncwb anncwb merged commit 1db87ff into main Aug 19, 2024
17 checks passed
@anncwb anncwb deleted the bugfix/awesome-819 branch August 19, 2024 15:28
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

Outside diff range, codebase verification and nitpick comments (2)
packages/@core/ui-kit/menu-ui/src/index.ts (1)

3-3: Inconsistent type export updates detected.

There are still references to ./interface in the following files, which suggests that the change to ./types is not fully consistent across the codebase. Please update these references to ensure consistency:

  • packages/@core/ui-kit/shadcn-ui/src/components/dropdown-menu/index.ts
  • packages/@core/ui-kit/shadcn-ui/src/components/context-menu/index.ts
Analysis chain

Change in type export source is approved.

The export source for types has been updated from ./interface to ./types. Ensure that this change is consistent with the rest of the codebase and that all references to these types are updated accordingly.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the usage of types exported from `./types`.

# Test: Search for references to the old and new type export sources. Expect: No references to `./interface` and correct references to `./types`.
rg --type ts $'from \'./interface\''
rg --type ts $'from \'./types\''

Length of output: 1885

packages/effects/hooks/src/use-design-tokens.ts (1)

21-21: colorBorderSecondary is not utilized elsewhere in the codebase.

The colorBorderSecondary property is defined but not used outside use-design-tokens.ts. Ensure this property is integrated where necessary to avoid unused code and to leverage its intended design flexibility.

  • File: packages/effects/hooks/src/use-design-tokens.ts
  • Lines: 21, 52-53
Analysis chain

Addition of colorBorderSecondary enhances flexibility.

The new colorBorderSecondary property provides more styling options. Ensure it's utilized effectively in the UI components.

Also applies to: 52-53

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the usage of `colorBorderSecondary` in the codebase.

# Test: Search for `colorBorderSecondary` usage. Expect: Proper utilization in styling components.
rg --type ts 'colorBorderSecondary'

Length of output: 218

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 01d6033 and c4b4564.

Files selected for processing (22)
  • apps/backend-mock/utils/jwt-utils.ts (3 hunks)
  • docs/src/guide/introduction/thin.md (2 hunks)
  • packages/@core/base/design/src/design-tokens/dark/index.css (13 hunks)
  • packages/@core/base/design/src/design-tokens/default/index.css (1 hunks)
  • packages/@core/base/shared/src/utils/index.ts (1 hunks)
  • packages/@core/base/shared/src/utils/to.ts (1 hunks)
  • packages/@core/ui-kit/layout-ui/src/components/layout-header.vue (6 hunks)
  • packages/@core/ui-kit/layout-ui/src/vben-layout.vue (4 hunks)
  • packages/@core/ui-kit/menu-ui/src/components/menu-item.vue (1 hunks)
  • packages/@core/ui-kit/menu-ui/src/components/menu.vue (1 hunks)
  • packages/@core/ui-kit/menu-ui/src/components/sub-menu-content.vue (1 hunks)
  • packages/@core/ui-kit/menu-ui/src/components/sub-menu.vue (3 hunks)
  • packages/@core/ui-kit/menu-ui/src/hooks/use-menu-context.ts (1 hunks)
  • packages/@core/ui-kit/menu-ui/src/hooks/use-menu.ts (1 hunks)
  • packages/@core/ui-kit/menu-ui/src/index.ts (1 hunks)
  • packages/@core/ui-kit/menu-ui/src/menu.vue (1 hunks)
  • packages/@core/ui-kit/tabs-ui/src/components/tabs-chrome/tabs.vue (2 hunks)
  • packages/@core/ui-kit/tabs-ui/src/components/tabs/tabs.vue (1 hunks)
  • packages/effects/hooks/src/use-design-tokens.ts (2 hunks)
  • packages/stores/src/modules/tabbar.ts (8 hunks)
  • packages/styles/src/antd/index.css (1 hunks)
  • playground/.env (1 hunks)
Files skipped from review due to trivial changes (10)
  • packages/@core/base/shared/src/utils/index.ts
  • packages/@core/ui-kit/menu-ui/src/components/menu-item.vue
  • packages/@core/ui-kit/menu-ui/src/components/menu.vue
  • packages/@core/ui-kit/menu-ui/src/components/sub-menu-content.vue
  • packages/@core/ui-kit/menu-ui/src/hooks/use-menu-context.ts
  • packages/@core/ui-kit/menu-ui/src/hooks/use-menu.ts
  • packages/@core/ui-kit/menu-ui/src/menu.vue
  • packages/@core/ui-kit/tabs-ui/src/components/tabs-chrome/tabs.vue
  • packages/@core/ui-kit/tabs-ui/src/components/tabs/tabs.vue
  • playground/.env
Additional comments not posted (18)
packages/styles/src/antd/index.css (1)

10-13: Dark mode styling enhancements are approved.

The use of Tailwind CSS for dark mode styling improves visual consistency. Ensure these changes are correctly applied and do not conflict with existing styles.

Verification successful

Dark mode styling enhancements are correctly applied.

The new dark mode styles using Tailwind CSS are applied to .ant-message-notice-content and .ant-notification-notice without conflicts in the packages/styles/src/antd/index.css file. No conflicting styles were found in the immediate context.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the application of new dark mode styles.

# Test: Search for usage of the new CSS classes in the codebase. Expect: Correct application of the new styles.
rg --type css $'dark:border-border/60 dark:border'

Length of output: 130


Script:

#!/bin/bash
# Search for other styles applied to .ant-message-notice-content and .ant-notification-notice to check for potential conflicts.
rg --type css '\.ant-message-notice-content|\.ant-notification-notice' -A 3

Length of output: 319

packages/@core/ui-kit/layout-ui/src/components/layout-header.vue (1)

72-72: Refactoring to use slots for toggle buttons is approved.

The refactoring enhances flexibility by allowing external control over the toggle button's rendering. Ensure that the removed properties and methods are not needed elsewhere in the codebase.

docs/src/guide/introduction/thin.md (2)

31-35: Documentation updates for Mock service are approved.

The updates clarify the use of the Mock service and provide instructions for disabling it. Ensure these changes align with the current project setup.


55-59: New build scripts are approved.

The addition of new build scripts enhances the build process. Verify that these scripts are correctly integrated into the project setup.

apps/backend-mock/utils/jwt-utils.ts (1)

17-17: LGTM! Verify the impact on other code parts.

The changes in the token generation and verification functions seem correct. Ensure that these changes do not break any existing functionality or integrations.

Also applies to: 21-23, 36-36, 51-51

Verification successful

Environment Variables Defined in .env File

The ACCESS_TOKEN_SECRET and REFRESH_TOKEN_SECRET are defined in the .env file located in apps/backend-mock. Ensure that these environment variables are correctly loaded and used across the application to prevent any potential issues with token generation and verification.

  • File: apps/backend-mock/.env
    • ACCESS_TOKEN_SECRET=access_token_secret
    • REFRESH_TOKEN_SECRET=refresh_token_secret

Make sure these secrets are managed securely and not exposed in any public or insecure environments.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the usage of ACCESS_TOKEN_SECRET and REFRESH_TOKEN_SECRET across the codebase.

# Test: Search for the usage of these constants. Expect: No hardcoded secrets in production code.
rg --type js 'ACCESS_TOKEN_SECRET|REFRESH_TOKEN_SECRET'

Length of output: 57


Script:

#!/bin/bash
# Description: Search for the definition and usage of ACCESS_TOKEN_SECRET and REFRESH_TOKEN_SECRET across the codebase.

# Search for the definition of ACCESS_TOKEN_SECRET and REFRESH_TOKEN_SECRET
rg --type js 'const ACCESS_TOKEN_SECRET|const REFRESH_TOKEN_SECRET'

# Search for environment variable usage related to ACCESS_TOKEN_SECRET and REFRESH_TOKEN_SECRET
rg --type js 'process\.env\.ACCESS_TOKEN_SECRET|process\.env\.REFRESH_TOKEN_SECRET'

Length of output: 155


Script:

#!/bin/bash
# Description: Search for ACCESS_TOKEN_SECRET and REFRESH_TOKEN_SECRET in configuration files and other relevant locations.

# Search for ACCESS_TOKEN_SECRET and REFRESH_TOKEN_SECRET in .env files
rg 'ACCESS_TOKEN_SECRET|REFRESH_TOKEN_SECRET' --glob '*.env'

# Search for ACCESS_TOKEN_SECRET and REFRESH_TOKEN_SECRET in JSON configuration files
rg 'ACCESS_TOKEN_SECRET|REFRESH_TOKEN_SECRET' --glob '*.json'

# Search for ACCESS_TOKEN_SECRET and REFRESH_TOKEN_SECRET in YAML configuration files
rg 'ACCESS_TOKEN_SECRET|REFRESH_TOKEN_SECRET' --glob '*.yaml'

Length of output: 318

packages/@core/ui-kit/menu-ui/src/components/sub-menu.vue (2)

4-4: Import consolidation improves readability.

The consolidation of imports into a single line enhances code clarity and reduces clutter.


214-214: Verify the impact of open-delay change.

Changing open-delay from 30 to 0 will make the submenu open immediately. Ensure this aligns with the intended user experience.

Verification successful

Confirm the localized impact of open-delay change

The open-delay property is only used in the sub-menu.vue file, where it has been changed to 0. This means the change is localized to this component. Ensure that this immediate opening behavior aligns with the intended user experience for this submenu. If this behavior is consistent with user expectations, no further changes are needed. If not, consider adjusting the delay to better suit the design goals.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the usage of `open-delay` in the codebase.

# Test: Search for `open-delay` usage. Expect: Consistent behavior across all submenus.
rg --type vue 'open-delay'

Length of output: 54


Script:

#!/bin/bash
# Description: Verify the usage of `open-delay` in the codebase by searching in .vue files.

# Test: Search for `open-delay` usage in .vue files. Expect: Consistent behavior across all submenus.
rg 'open-delay' --glob '**/*.vue' -A 3

Length of output: 356

packages/@core/base/design/src/design-tokens/default/index.css (1)

36-36: Update to --destructive color enhances visibility.

The new color for --destructive is more vibrant. Ensure it aligns with the overall design and is visually distinct for destructive actions.

packages/@core/base/design/src/design-tokens/dark/index.css (1)

37-37: Systematic update of --destructive color ensures consistency.

The updated color for --destructive is applied across multiple themes. Ensure consistency and correct application in all relevant components.

Also applies to: 113-113, 139-139, 165-165, 191-191, 217-217, 243-243, 269-269, 321-321, 347-347, 373-373, 399-399, 425-425

Verification successful

Systematic update of --destructive color ensures consistency.

The updated --destructive color is consistently applied across the dark theme as intended. This confirms that the change is correctly reflected in the relevant components.

  • packages/@core/base/design/src/design-tokens/dark/index.css: Multiple instances of --destructive are updated to 359.21 68.47% 56.47%.

The update maintains consistency across the theme files, ensuring uniformity in the design system.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the application of `--destructive` color across themes.

# Test: Search for `--destructive` usage in dark themes. Expect: Consistent application across all themes.
rg --type css '--destructive' --context 5

Length of output: 457


Script:

#!/bin/bash
# Description: Verify the application of `--destructive` color across themes.

# Test: Search for `--destructive` usage in dark themes. Expect: Consistent application across all themes.
rg --type css '--destructive' -A 5

Length of output: 450


Script:

#!/bin/bash
# Description: Verify the application of `--destructive` color across themes.

# Test: Search for `--destructive` usage in dark themes. Expect: Consistent application across all themes.
rg --type css -e '--destructive' -A 5

Length of output: 17379

packages/stores/src/modules/tabbar.ts (7)

144-144: Verify updateCacheTabs logic for multiple tabs.

Ensure that the logic within updateCacheTabs is appropriate for handling multiple tabs, as implied by its name change.


153-153: Verify updateCacheTabs logic for multiple tabs.

Ensure that the logic within updateCacheTabs is appropriate for handling multiple tabs, as implied by its name change.


233-233: Verify updateCacheTabs logic for multiple tabs.

Ensure that the logic within updateCacheTabs is appropriate for handling multiple tabs, as implied by its name change.


342-342: Verify updateCacheTabs logic for multiple tabs.

Ensure that the logic within updateCacheTabs is appropriate for handling multiple tabs, as implied by its name change.


370-370: Verify updateCacheTabs logic for multiple tabs.

Ensure that the logic within updateCacheTabs is appropriate for handling multiple tabs, as implied by its name change.


Line range hint 420-437: LGTM! updateCacheTabs handles multiple tabs effectively.

The logic within updateCacheTabs is appropriate for managing multiple tabs, aligning with its name change.


50-50: Verify updateCacheTabs logic for multiple tabs.

Ensure that the logic within updateCacheTabs is appropriate for handling multiple tabs, as implied by its name change.

Verification successful

Verified: updateCacheTabs handles multiple tabs correctly.

The method updateCacheTabs iterates over all tabs, selectively processing those that require persistence, which is consistent with handling multiple tabs efficiently.

  • The logic correctly skips tabs that do not need to be cached.
  • It processes each tab's matched property, indicating handling of multiple tabs.
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the logic of `updateCacheTabs` to ensure it handles multiple tabs correctly.

# Test: Search for the method implementation. Expect: Logic that handles multiple tabs.
ast-grep --lang typescript --pattern $'async updateCacheTabs() {
  $$$
}'

Length of output: 530


Script:

#!/bin/bash
# Description: Search for the definition of `updateCacheTabs` using ripgrep to verify its logic.

# Test: Search for the method definition in TypeScript files.
rg 'async updateCacheTabs\(\)' --type ts -A 10

Length of output: 774

packages/@core/ui-kit/layout-ui/src/vben-layout.vue (2)

336-341: LGTM! Header toggle button logic is correct.

The logic for displaying the header toggle button correctly includes a check for props.isMobile, enhancing responsiveness.


428-433: LGTM! handleHeaderToggle logic is appropriate.

The function handleHeaderToggle correctly handles mobile views by collapsing the sidebar and emits toggleSidebar for other views, enhancing interaction.

Comment on lines +1 to +21
/**
* @param { Readonly<Promise> } promise
* @param {object=} errorExt - Additional Information you can pass to the err object
* @return { Promise }
*/
export async function to<T, U = Error>(
promise: Readonly<Promise<T>>,
errorExt?: object,
): Promise<[null, T] | [U, undefined]> {
try {
const data = await promise;
const result: [null, T] = [null, data];
return result;
} catch (error) {
if (errorExt) {
const parsedError = Object.assign({}, error, errorExt);
return [parsedError as U, undefined];
}
return [error as U, undefined];
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

New utility function to is well-implemented.

This utility function provides a clean way to handle promises with error extensions. Consider adding unit tests to ensure its reliability.

Would you like me to generate unit tests for this utility function or open a GitHub issue to track this task?

Comment on lines +7 to +9
// TODO: Replace with your own secret key
const ACCESS_TOKEN_SECRET = 'access_token_secret';
const REFRESH_TOKEN_SECRET = 'refresh_token_secret';
Copy link
Contributor

Choose a reason for hiding this comment

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

Security Concern: Avoid hardcoding secrets.

Hardcoding secrets like ACCESS_TOKEN_SECRET and REFRESH_TOKEN_SECRET poses a security risk. Consider using environment variables or a secure vault for managing secrets.

- const ACCESS_TOKEN_SECRET = 'access_token_secret';
- const REFRESH_TOKEN_SECRET = 'refresh_token_secret';
+ const ACCESS_TOKEN_SECRET = process.env.ACCESS_TOKEN_SECRET || 'default_access_token_secret';
+ const REFRESH_TOKEN_SECRET = process.env.REFRESH_TOKEN_SECRET || 'default_refresh_token_secret';
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
// TODO: Replace with your own secret key
const ACCESS_TOKEN_SECRET = 'access_token_secret';
const REFRESH_TOKEN_SECRET = 'refresh_token_secret';
// TODO: Replace with your own secret key
const ACCESS_TOKEN_SECRET = process.env.ACCESS_TOKEN_SECRET || 'default_access_token_secret';
const REFRESH_TOKEN_SECRET = process.env.REFRESH_TOKEN_SECRET || 'default_refresh_token_secret';

@github-actions github-actions bot locked and limited conversation to collaborators Sep 20, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants