Skip to main content

useCookieAuthRefresh()

Home > @backstage/plugin-auth-react > useCookieAuthRefresh

A hook that will refresh the cookie when it is about to expire.

Signature:

function useCookieAuthRefresh(options: {
pluginId: string;
}): {
status: 'loading';
} | {
status: 'error';
error: Error;
retry: () => void;
} | {
status: 'success';
data: {
expiresAt: string;
};
};

Parameters

ParameterTypeDescription
options{ pluginId: string; }Options for configuring the refresh cookie endpoint

Returns:

{ status: 'loading'; } | { status: 'error'; error: Error; retry: () => void; } | { status: 'success'; data: { expiresAt: string; }; }