@shane32/msoauth
Version:
A React library for Azure AD authentication with PKCE (Proof Key for Code Exchange) flow support. This library provides a secure and easy-to-use solution for implementing Azure AD authentication in React applications, with support for both API and Microso
10 lines (9 loc) • 445 B
TypeScript
import AuthManager from "./AuthManager";
/**
* Hook to access the auth manager
* @param {string} [providerId] - Optional provider ID to get a specific auth manager
* @returns {AuthManager} The auth manager
* @throws {Error} If used outside of an AuthProvider or if the specified provider is not found
*/
declare function useAuth<TPolicyNames extends string = string>(providerId?: string): AuthManager<TPolicyNames>;
export default useAuth;