0.2.3 • Published 8 months ago

@forge/response v0.2.3

Weekly downloads
-
License
UNLICENSED
Repository
-
Last release
8 months ago

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
  });
}
0.2.3-next.0

9 months ago

0.2.1-next.0

10 months ago

0.2.2-next.0

9 months ago

0.2.1

10 months ago

0.2.3

8 months ago

0.2.2

9 months ago

0.2.0

2 years ago

0.1.2

3 years ago

0.2.0-next.0

2 years ago

0.1.2-next.0

3 years ago

0.1.1

3 years ago

0.1.1-next.0

3 years ago