UNPKG

@nhost/react

Version:

Nhost React library

36 lines (35 loc) 927 B
import { Provider, ProviderOptions } from '@nhost/nhost-js'; /** * Use the hook `useProviderLink` to get an OAuth provider URL that can be used to sign in users. * * @example * ```js * const providerLink = useProviderLink(); * ``` * * @example * * Pass in the `connect` option to connect the user's account to the OAuth provider when different emails are used. * * ```js * const providerLink = useProviderLink({ connect: true }); * ``` * * @example * ```jsx * import { useProviderLink } from '@nhost/react'; * * const Component = () => { * const { facebook, github } = useProviderLink(); * * return ( * <div> * <a href={facebook}>Sign in with Facebook</a> * <a href={github}>Sign in with GitHub</a> * </div> * ); * }; * ``` */ export declare const useProviderLink: (options?: ProviderOptions) => Record<Provider, string>; //# sourceMappingURL=useProviderLink.d.ts.map