isa-auth-core
Version:
23 lines (22 loc) • 1.06 kB
TypeScript
import { addAuthEventListener, removeAuthEventListener, dispatchAuthEvent } from './event/customAuth';
import { CoreProvicerType } from './mappings';
interface AuthCoreProps {
providerType: CoreProvicerType;
secret?: string;
}
declare class AuthCore {
private provider;
private button;
private serviceInstance;
constructor({ providerType, secret, }: AuthCoreProps);
getService(): import("./service/baseAuthService").default | import("./service/jwtService").default;
getProvider(): typeof import("./providers/googleAuth").default;
getButton(): import("./components/loginButton").default;
getWebComponentAPI(): {
addAuthEventListener: typeof addAuthEventListener;
removeAuthEventListener: typeof removeAuthEventListener;
dispatchAuthEvent: typeof dispatchAuthEvent;
watchAuthState: (<T extends HTMLElement>(callback: (auth: boolean) => void) => void | (() => void)) | (<T extends HTMLElement>(callback: (auth: boolean) => void) => void | (() => void));
};
}
export default AuthCore;