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
Parameter |
Type |
Description |
---|---|---|
options |
{ pluginId: string; } |
Options for configuring the refresh cookie endpoint |
{ status: 'loading'; } | { status: 'error'; error: Error; retry: () => void; } | { status: 'success'; data: { expiresAt: string; }; }