diff --git a/src/components/use-oauth2.ts b/src/components/use-oauth2.ts index b52a517..76b2502 100644 --- a/src/components/use-oauth2.ts +++ b/src/components/use-oauth2.ts @@ -133,6 +133,7 @@ export const useOAuth2 = (props: TOauth2Props) loading: false, error: genericError.toString(), }); + if (onError) await onError(genericError.toString()); } finally { // Clear stuff ... cleanup(intervalRef, popupRef, handleMessageListener);