0.0.3 • Published 3 years ago

svelte-google-login v0.0.3

Weekly downloads
-
License
-
Repository
github
Last release
3 years ago

svelte-google-login

Easy to use Google Login Button for Svelte

Usage

<script lang="ts">
	import { GoogleLoginButton } from 'svelte-google-login';
	const handleLoginSuccess = (googleUser: gapi.auth2.GoogleUser) => Promise.resolve();
	const handleLoginFailure = () => {};
</script>

<GoogleLoginButton
	clientId="GOOGLE_CLIENT_ID"
	onSuccess="{handleLoginSuccess}"
	onFailure="{handleLoginFailure}"
/>