svelte-social-auth

Social Auth for Svelte v3

Github stars Tracking Chart

Svelte Social Auth

js-standard-style CircleCI svelte-v2 svelte-v3

Google and Facebook Auth

SSR Ready
Svelte v3 + v2

Usage

<GoogleAuth clientId="your-google-auth-client-id" on:auth-success={e => console.dir(e.detail.user)} />
<FacebookAuth appId="your-facebook-app-id" on:auth-success={e => console.dir(e.detail.user)} />

<script>
  import { GoogleAuth, FacebookAuth } from '@beyonk/svelte-social-auth'
</script>

Usage with v2

<GoogleAuth clientId="your-google-auth-client-id" on:auth-success={e => console.dir(e.detail.user)} />
<FacebookAuth appId="your-facebook-app-id" on:auth-success={e => console.dir(e.detail.user)} />

<script>
  import { GoogleAuth, FacebookAuth } from '@beyonk/svelte-social-auth/src/components.v2.js'
</script>

Attributes

Common attributes:, Attribute, Description, Type, Default, ---, ---, ---, ---, text, Text of the sign-in button, string, 'Sign in with ', The attributes for the GoogleAuth component are:, Attribute, Description, Type, Default, ---, ---, ---, ---, clientId, Google service account client id, string, -, The attributes for the FacebookAuth component are:, Attribute, Description, Type, Default, ---, ---, ---, ---, appId, Facebook app id, string, -, ### Events

The events fired by the GoogleAuth component are:, Event, Purpose, Properties, ---, ---, ---, on:auth-success, User authentication success, { user }, on:auth-failure, User authentication failure, { error }, on:init-error, Google Auth initialisation failure, { error }, The events fired by the FacebookAuth component are:, Event, Purpose, Properties, ---, ---, ---, on:auth-success, User authentication success, { user }, on:auth-failure, User authentication failure, { error }, ### Developing / Contributing

Note that Facebook requires that you have HTTPS locally, despite their documentation to the contrary, so you will need to generate some SSL certs and point rollup config at them.

GOOGLE_CLIENT_ID=<your-google-client-id> FACEBOOK_APP_ID=<your-facebook-app-id> npm run dev

Main metrics

Overview
Name With Ownerbeyonk-group/svelte-social-auth
Primary LanguageSvelte
Program languageHTML (Language Count: 4)
Platform
License:
所有者活动
Created At2019-04-29 11:54:07
Pushed At2024-10-28 15:29:04
Last Commit At2022-10-17 11:32:46
Release Count23
Last Release Namev3.0.0 (Posted on 2022-04-26 16:29:16)
First Release Namev1.0.0 (Posted on 2019-03-25 16:40:38)
用户参与
Stargazers Count169
Watchers Count7
Fork Count19
Commits Count79
Has Issues Enabled
Issues Count12
Issue Open Count8
Pull Requests Count11
Pull Requests Open Count6
Pull Requests Close Count6
项目设置
Has Wiki Enabled
Is Archived
Is Fork
Is Locked
Is Mirror
Is Private