Skip to main content
Version: Next

HttpAuthService.issueUserCookie()

Home > @backstage/backend-plugin-api > HttpAuthService > issueUserCookie

Issues a limited access token as a cookie on the given response object. This is only possible for requests that were originally made with user credentials (such as a Backstage token).

This must be called before sending any payload data.

Signature:

issueUserCookie(
res: Response,
options?: {
credentials?: BackstageCredentials;
}): Promise<{
expiresAt: Date;
}>;

Parameters

ParameterTypeDescription
resResponse
options{ credentials?: BackstageCredentials; }(Optional)

Returns:

Promise<{ expiresAt: Date; }>