Skip to content

Conversation

shobhitupadhyayy
Copy link
Contributor

  • Introduced a new build.sh script for region selection and OAuth login.
  • Added app.json to .gitignore and included manifest.json in API .gitignore.
  • Updated package dependencies for improved functionality.
  • Implemented saveOAuthToken endpoint for secure token handling.
  • Enhanced region configuration and API host management in constants.
  • Added error handling and logging improvements in auth service.

- Introduced a new build.sh script for region selection and OAuth login.
- Added app.json to .gitignore and included manifest.json in API .gitignore.
- Updated package dependencies for improved functionality.
- Implemented saveOAuthToken endpoint for secure token handling.
- Enhanced region configuration and API host management in constants.
- Added error handling and logging improvements in auth service.
@shobhitupadhyayy shobhitupadhyayy requested a review from a team as a code owner September 4, 2025 07:45
@umeshmore45 umeshmore45 requested a review from Copilot September 4, 2025 09:37
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces OAuth authentication functionality with multi-region support for a Contentstack migration application. It adds comprehensive OAuth token handling, region configuration management, and automated setup workflows.

  • Adds OAuth authentication flow with PKCE security implementation
  • Introduces multi-region support with automated region selection and configuration
  • Implements secure token storage and refresh mechanisms with database persistence

Reviewed Changes

Copilot reviewed 10 out of 12 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
build.sh New setup script for region selection, OAuth login, and migration execution
api/sso.utils.js OAuth configuration utility with multi-region support and app management
api/src/services/auth.service.ts Enhanced auth service with OAuth token handling and refresh functionality
api/src/routes/auth.routes.ts New OAuth token save endpoint route
api/src/models/types.ts Added RefreshTokenResponse interface for OAuth responses
api/src/controllers/auth.controller.ts New controller method for OAuth token handling
api/src/constants/index.ts Regional API host configurations for OAuth endpoints
api/package.json Updated dependencies including marketplace SDK and express-session
api/.gitignore Added manifest.json to ignored files
.talismanrc Updated security scan configuration with new file checksums
Files not reviewed (1)
  • api/package-lock.json: Language not supported
Comments suppressed due to low confidence (1)

api/src/services/auth.service.ts:1

  • The openBrowser function is called but not defined or imported. This will cause a runtime error.
import { Request } from "express";

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

…cies

- Removed redundant variables for client_id and client_secret in saveOAuthToken function.
- Updated logging to use a centralized logger instead of console methods.
- Removed unnecessary deletion of code_verifier from the request session.
- Updated package.json to remove outdated "api" dependency.
Base automatically changed from dev to pre-stage September 5, 2025 09:44
- Modified build.sh to append '/v2/auth/save-token' to the redirect_uri.
- Updated auth.service.ts to use the correct redirect_uri for token requests.
- Ensured consistency in region configuration and API endpoint handling.
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