1.3.1 • Published 2 years ago

svelte-github-login v1.3.1

Weekly downloads
1
License
MIT
Repository
github
Last release
2 years ago

Svelte Github Login

npm version License: MIT Build Status Netlify Status Language grade: JavaScript

Github Login Component to Svelte

Installation

npm i svelte-github-login
// OR
yarn add svelte-github-login

Note: to use this library in sapper, install as devDependency. See the link.

Demo Link

Local demo:

git clone https://github.com/andrelmlins/svelte-github-login.git
cd svelte-github-login
npm install && npm run dev

Examples

An example of how to use the library:

<script>
  import GithubLogin from "svelte-github-login";
</script>

<GithubLogin
  clientId="XXX"
  scope="user:email"
  redirectUri="http://localhost:5000/"
  on:success={params => console.log(params)}
  on:error={error => console.log(error)}
  let:onLogin
>
  <button on:click={onLogin}>Github Login</button>
</GithubLogin>

Properties

Raw component props (before transform):

PropTypeDescription
clientIdstringClient ID for GitHub OAuth application
scopestringA space-delimited list of permissions that the application requires
redirectUristringRegistered redirect URI for GitHub OAuth application
statestringValue created by the maintenance state between the request and the callback
allowSignupstringOption of unauthenticated users to register
loginstringSuggests a specific account to use for signing in and authorizing the app.

Events

PropTypeDescription
successfuncCall with success
errorfuncCall with error
requestfuncCall with offset

Slot Properties

PropTypeDescription
onLoginfuncCall for login

NPM Statistics

Download stats for this NPM package

NPM

License

Svelte Github Login is open source software licensed as MIT.

1.3.1

2 years ago

1.3.0

3 years ago

1.2.0

4 years ago

1.1.0

4 years ago

1.0.0

4 years ago

0.1.2

4 years ago

0.1.1

4 years ago

0.1.3

4 years ago

0.1.0

4 years ago