react-auth-kit
Advanced tools
Comparing version 3.0.0-alpha.34 to 3.0.0-alpha.35
@@ -25,3 +25,3 @@ "use strict"; | ||
if (!cookieDomain) { | ||
throw new _errors.AuthKitError('authType \'cookie\' ' + 'requires \'cookieDomain\' and \'cookieSecure\' ' + 'props in AuthProvider'); | ||
throw new _errors.AuthError('authType \'cookie\' ' + 'requires \'cookieDomain\' and \'cookieSecure\' ' + 'props in AuthProvider'); | ||
} | ||
@@ -28,0 +28,0 @@ } |
@@ -10,3 +10,3 @@ /** | ||
* @class | ||
* @name AuthKitError | ||
* @name AuthError | ||
* @extends Error | ||
@@ -16,3 +16,3 @@ * | ||
*/ | ||
export declare class AuthKitError extends Error { | ||
export declare class AuthError extends Error { | ||
/** | ||
@@ -19,0 +19,0 @@ * @constructor |
@@ -6,4 +6,4 @@ "use strict"; | ||
}); | ||
exports.AuthKitError = void 0; | ||
class AuthKitError extends Error { | ||
exports.AuthError = void 0; | ||
class AuthError extends Error { | ||
constructor(message) { | ||
@@ -13,2 +13,2 @@ super(message); | ||
} | ||
exports.AuthKitError = AuthKitError; | ||
exports.AuthError = AuthError; |
@@ -18,3 +18,3 @@ "use strict"; | ||
if (c === null) { | ||
throw new _errors.AuthKitError('Auth Provider is missing. ' + 'Please add the AuthProvider before Router'); | ||
throw new _errors.AuthError('Auth Provider is missing. ' + 'Please add the AuthProvider before Router'); | ||
} | ||
@@ -21,0 +21,0 @@ return function () { |
@@ -13,3 +13,3 @@ /** | ||
*/ | ||
declare function useAuthUser(): () => any | null; | ||
declare function useAuthUser<T>(): () => T | null; | ||
export default useAuthUser; |
@@ -18,3 +18,3 @@ "use strict"; | ||
if (context === null) { | ||
throw new _errors.AuthKitError('Auth Provider is missing. ' + 'Please add the AuthProvider before Router'); | ||
throw new _errors.AuthError('Auth Provider is missing. ' + 'Please add the AuthProvider before Router'); | ||
} | ||
@@ -21,0 +21,0 @@ return function () { |
@@ -18,3 +18,3 @@ "use strict"; | ||
if (context === null) { | ||
throw new _errors.AuthKitError('Auth Provider is missing. ' + 'Please add the AuthProvider before Router'); | ||
throw new _errors.AuthError('Auth Provider is missing. ' + 'Please add the AuthProvider before Router'); | ||
} | ||
@@ -21,0 +21,0 @@ return function () { |
@@ -25,3 +25,3 @@ "use strict"; | ||
if (context === null) { | ||
throw new _errors.AuthKitError('Auth Provider is missing. ' + 'Please add the AuthProvider before Router'); | ||
throw new _errors.AuthError('Auth Provider is missing. ' + 'Please add the AuthProvider before Router'); | ||
} | ||
@@ -34,3 +34,3 @@ return function (signInConfig) { | ||
} else { | ||
throw new _errors.AuthKitError('Make sure you given "refreshToken" and ' + '"refreshTokenExpireIn" parameter'); | ||
throw new _errors.AuthError('Make sure you given "refreshToken" and ' + '"refreshTokenExpireIn" parameter'); | ||
} | ||
@@ -37,0 +37,0 @@ } else { |
@@ -18,3 +18,3 @@ "use strict"; | ||
if (context === null) { | ||
throw new _errors.AuthKitError('Auth Provider is missing. ' + 'Please add the AuthProvider before Router'); | ||
throw new _errors.AuthError('Auth Provider is missing. ' + 'Please add the AuthProvider before Router'); | ||
} | ||
@@ -21,0 +21,0 @@ return function () { |
{ | ||
"name": "react-auth-kit", | ||
"version": "3.0.0-alpha.34", | ||
"version": "3.0.0-alpha.35", | ||
"description": "Authentication Library for React, which makes Token based auth very easy", | ||
@@ -90,3 +90,3 @@ "keywords": [ | ||
}, | ||
"gitHead": "98e2fbf596edebe7f302b5a1cf78e43d18f325d4" | ||
"gitHead": "de8adf9c1a0ac5a6d599b909f8e53f4d328ea6b2" | ||
} |
@@ -23,3 +23,3 @@ "use strict"; | ||
if (context === null) { | ||
throw new _errors.AuthKitError('Auth Provider is missing. ' + 'Please add the AuthProvider before Router'); | ||
throw new _errors.AuthError('Auth Provider is missing. ' + 'Please add the AuthProvider before Router'); | ||
} | ||
@@ -26,0 +26,0 @@ var location = (0, _reactRouterDom.useLocation)(); |
@@ -224,3 +224,3 @@ "use strict"; | ||
} else { | ||
throw new _errors.AuthKitError('JWT has no iat param'); | ||
throw new _errors.AuthError('JWT has no iat param'); | ||
} | ||
@@ -227,0 +227,0 @@ }; |
73576
46
1621