UNPKG

magner

Version:

Universal admin panel magnetic to any backend

11 lines (10 loc) 397 B
import type { RouteAccessRestriction } from '../../types/configs/routing/routing'; /** * Navigation guard that checks if you can enter a protected route. * Gets your authorization token, sends it to the backend (if not verified) * and lets you proceed further. */ declare const checkAuth: (roles?: RouteAccessRestriction) => Promise<boolean | { name: string; }>; export default checkAuth;