diff --git a/plugins/auth-react/api-report.md b/plugins/auth-react/api-report.md
index 660154271c..01ec9b028a 100644
--- a/plugins/auth-react/api-report.md
+++ b/plugins/auth-react/api-report.md
@@ -21,12 +21,19 @@ export type CookieAuthRefreshProviderProps = {
export function useCookieAuthRefresh(options: {
pluginId: string;
path?: string;
-}): {
- status: 'loading' | 'error' | 'success';
- error?: Error;
- result?: {
- expiresAt: string;
- };
- retry: () => void;
-};
+}):
+ | {
+ status: 'loading';
+ }
+ | {
+ status: 'error';
+ error: Error;
+ retry: () => void;
+ }
+ | {
+ status: 'success';
+ data: {
+ expiresAt: string;
+ };
+ };
```
diff --git a/plugins/auth-react/src/components/CookieAuthRefreshProvider/CookieAuthRefreshProvider.tsx b/plugins/auth-react/src/components/CookieAuthRefreshProvider/CookieAuthRefreshProvider.tsx
index 8f6f38e225..85846b28c9 100644
--- a/plugins/auth-react/src/components/CookieAuthRefreshProvider/CookieAuthRefreshProvider.tsx
+++ b/plugins/auth-react/src/components/CookieAuthRefreshProvider/CookieAuthRefreshProvider.tsx
@@ -44,16 +44,16 @@ export function CookieAuthRefreshProvider(
const app = useApp();
const { Progress } = app.getComponents();
- const { status, error, retry } = useCookieAuthRefresh(options);
+ const result = useCookieAuthRefresh(options);
- if (status === 'loading') {
+ if (result.status === 'loading') {
return ;
}
- if (status === 'error' && error) {
+ if (result.status === 'error') {
return (
-
-