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?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?