Skip to content

Comments

refactor: move auth constants from utils to auth package#97

Merged
adelrodriguez merged 1 commit intomainfrom
02-18-refactor_move_auth_constants_from_utils_to_auth_package
Feb 19, 2026
Merged

refactor: move auth constants from utils to auth package#97
adelrodriguez merged 1 commit intomainfrom
02-18-refactor_move_auth_constants_from_utils_to_auth_package

Conversation

@adelrodriguez
Copy link
Collaborator

@adelrodriguez adelrodriguez commented Feb 19, 2026

Greptile Summary

Moved auth-related constants (APP_ID and APP_NAME) from @init/utils package to @init/auth package as AUTH_COOKIE_PREFIX and AUTH_APP_NAME, improving package cohesion and separation of concerns.

  • Created new packages/auth/src/constants.ts with auth-specific constants
  • Updated all auth configuration files to import from new location
  • Enhanced expoClient wrapper to automatically apply default scheme and storagePrefix values
  • Reorganized integrations folder structure with new re-export files
  • Removed redundant configuration from mobile app auth setup
  • Auto-generated files updated with alphabetized field ordering

Confidence Score: 5/5

  • This PR is safe to merge with no risk
  • Clean refactoring with no logical changes - only moves constants to a more appropriate package location and simplifies configuration by providing sensible defaults
  • No files require special attention

Important Files Changed

Filename Overview
apps/api/src/shared/auth.ts Replaced APP_ID and APP_NAME imports with new AUTH_COOKIE_PREFIX and AUTH_APP_NAME from @init/auth/constants
apps/mobile/src/shared/auth.ts Removed redundant scheme and storagePrefix config since they're now defaults in expoClient
packages/auth/package.json Added new exports for constants and integrations paths, added package imports mapping
packages/auth/src/constants.ts New file defining auth-specific constants AUTH_COOKIE_PREFIX and AUTH_APP_NAME
packages/auth/src/expo/client.ts Wrapped expoClient to apply default scheme and storagePrefix from constants
packages/backend/src/functions/shared/auth.ts Replaced APP_ID and APP_NAME with new auth constants from @init/auth/constants

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A["`@init/utils/constants`"] -->|Deleted| B[APP_ID & APP_NAME]
    C["`@init/auth/constants`"] -->|Created| D[AUTH_COOKIE_PREFIX & AUTH_APP_NAME]
    D --> E["`apps/api/src/shared/auth.ts`"]
    D --> F["`apps/mobile/src/shared/auth.ts`"]
    D --> G["`packages/backend/src/functions/shared/auth.ts`"]
    D --> H["`packages/auth/src/expo/client.ts`"]
    H -->|Wraps with defaults| I[expoClient]
    I --> F
Loading

Last reviewed commit: 3c3989e

@coderabbitai
Copy link

coderabbitai bot commented Feb 19, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch 02-18-refactor_move_auth_constants_from_utils_to_auth_package

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@adelrodriguez adelrodriguez force-pushed the 02-18-refactor_move_i18n_cookie_name_to_tooling_internationalization_package branch from 8224d45 to e488cf2 Compare February 19, 2026 03:34
@adelrodriguez adelrodriguez force-pushed the 02-18-refactor_move_auth_constants_from_utils_to_auth_package branch from a4329c7 to 757d7bd Compare February 19, 2026 03:35
@adelrodriguez adelrodriguez force-pushed the 02-18-refactor_move_i18n_cookie_name_to_tooling_internationalization_package branch from e488cf2 to 85e4f22 Compare February 19, 2026 03:38
@adelrodriguez adelrodriguez force-pushed the 02-18-refactor_move_auth_constants_from_utils_to_auth_package branch 2 times, most recently from 4006c13 to 872af02 Compare February 19, 2026 03:53
@adelrodriguez adelrodriguez force-pushed the 02-18-refactor_move_i18n_cookie_name_to_tooling_internationalization_package branch 2 times, most recently from 0a35984 to bebe06f Compare February 19, 2026 03:53
@adelrodriguez adelrodriguez force-pushed the 02-18-refactor_move_auth_constants_from_utils_to_auth_package branch from 872af02 to 55b5f2a Compare February 19, 2026 03:54
@adelrodriguez adelrodriguez force-pushed the 02-18-refactor_move_i18n_cookie_name_to_tooling_internationalization_package branch from bebe06f to ef357e0 Compare February 19, 2026 03:59
@adelrodriguez adelrodriguez force-pushed the 02-18-refactor_move_auth_constants_from_utils_to_auth_package branch from 55b5f2a to 1f7ca99 Compare February 19, 2026 03:59
@adelrodriguez adelrodriguez force-pushed the 02-18-refactor_move_i18n_cookie_name_to_tooling_internationalization_package branch from ef357e0 to fcc2d1a Compare February 19, 2026 03:59
@adelrodriguez adelrodriguez force-pushed the 02-18-refactor_move_auth_constants_from_utils_to_auth_package branch 2 times, most recently from 25dfdb1 to e4db01e Compare February 19, 2026 04:07
@adelrodriguez adelrodriguez force-pushed the 02-18-refactor_move_i18n_cookie_name_to_tooling_internationalization_package branch 3 times, most recently from 09e50e2 to 89c9dd4 Compare February 19, 2026 04:11
@adelrodriguez adelrodriguez force-pushed the 02-18-refactor_move_auth_constants_from_utils_to_auth_package branch from e4db01e to 29f6db4 Compare February 19, 2026 04:12
@adelrodriguez adelrodriguez changed the base branch from 02-18-refactor_move_i18n_cookie_name_to_tooling_internationalization_package to graphite-base/97 February 19, 2026 04:14
@adelrodriguez adelrodriguez force-pushed the 02-18-refactor_move_auth_constants_from_utils_to_auth_package branch from 29f6db4 to aa7cd9c Compare February 19, 2026 04:15
@graphite-app graphite-app bot changed the base branch from graphite-base/97 to main February 19, 2026 04:15
@adelrodriguez adelrodriguez force-pushed the 02-18-refactor_move_auth_constants_from_utils_to_auth_package branch 2 times, most recently from 6c150e3 to 66a4d5d Compare February 19, 2026 04:41
@adelrodriguez adelrodriguez force-pushed the 02-18-refactor_move_auth_constants_from_utils_to_auth_package branch from 66a4d5d to 3c3989e Compare February 19, 2026 05:02
@adelrodriguez adelrodriguez merged commit 07c9d4e into main Feb 19, 2026
8 checks passed
@adelrodriguez adelrodriguez deleted the 02-18-refactor_move_auth_constants_from_utils_to_auth_package branch February 19, 2026 05:10
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.

1 participant