svelte-social-auth

Social Auth for Svelte v3

Github星跟踪图

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

主要指标

概览
名称与所有者beyonk-group/svelte-social-auth
主编程语言Svelte
编程语言HTML (语言数: 4)
平台
许可证
所有者活动
创建于2019-04-29 11:54:07
推送于2024-10-28 15:29:04
最后一次提交2022-10-17 11:32:46
发布数23
最新版本名称v3.0.0 (发布于 2022-04-26 16:29:16)
第一版名称v1.0.0 (发布于 2019-03-25 16:40:38)
用户参与
星数169
关注者数7
派生数19
提交数79
已启用问题?
问题数12
打开的问题数8
拉请求数11
打开的拉请求数6
关闭的拉请求数6
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?