UNPKG

vue3-google-signin

Version:

Google Sign-in for Vue3 with Google Identity Service

28 lines (27 loc) 763 B
import { type Ref } from "vue"; export type UseGsiScriptReturn = { /** * Script loaded successfully * * @type {Readonly<Ref<boolean>>} */ scriptLoaded: Readonly<Ref<boolean>>; /** * Failed to load the GSI script * * @type {Readonly<Ref<boolean>>} */ scriptLoadError: Readonly<Ref<boolean>>; }; /** * Use google GSI script in the application. * * This is automatically called when you use any of * the provided composables such as `useOneTap` or using the `GoogleSignInButton` component. * * No matter how many time this function called, it only loads the script once if it not present. * * @export * @return {*} {UseGsiScriptReturn} */ export default function useGsiScript(): UseGsiScriptReturn;