🚀 DAY 3 OF LAUNCH WEEK: Introducing Webhook Events for Pull Request Scans.Learn more →
Socket
Book a DemoInstallSign in
Socket

@forge/response

Package Overview
Dependencies
Maintainers
1
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@forge/response

Contains object to do validation of response objects at time of invocation

latest
npmnpm
Version
0.2.7
Version published
Weekly downloads
126
34.04%
Maintainers
1
Weekly downloads
 
Created
Source

Forge response

This package provides response objects so that validation can occur within the invocation and related errors can be output to the app logs

AuthProfile

The AuthProfile object is useful for validating input given by the app user when going through the external Authentication flow.

By implementing this into the profile retriever function, if the input to the retriever is invalid, then the corresponding error will be output to the app's logs

Example

import { AuthProfile } from '@forge/response';

export const retriever = (body: string) => {
  const externalProfile = JSON.parse(body);

  return new AuthProfile({
    id: externalProfile.user.id,
    displayName: externalProfile.user.name,
    avatarUrl: externalProfile.user.avatar
  });
}

FAQs

Package last updated on 07 Jul 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts