https://github.com/andrelmlins/svelte-github-login
Github Login Component to Svelte
https://github.com/andrelmlins/svelte-github-login
github library login svelte
Last synced: 10 months ago
JSON representation
Github Login Component to Svelte
- Host: GitHub
- URL: https://github.com/andrelmlins/svelte-github-login
- Owner: andrelmlins
- License: mit
- Created: 2019-12-04T02:47:16.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2023-01-06T14:12:50.000Z (about 3 years ago)
- Last Synced: 2025-03-26T04:51:09.649Z (10 months ago)
- Topics: github, library, login, svelte
- Language: Svelte
- Homepage: https://svelte-github-login.netlify.com/
- Size: 2.1 MB
- Stars: 12
- Watchers: 1
- Forks: 3
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-svelte - Svelte Github Login - Realiza login com o github. (UI Componentes / Comunidade Global)
README
# Svelte Github Login
[](https://www.npmjs.com/package/svelte-github-login) • [](https://github.com/andrelmlins/svelte-github-login/blob/master/LICENSE) • [](https://travis-ci.com/andrelmlins/svelte-github-login) • [](https://app.netlify.com/sites/xenodochial-saha-aa83fd/deploys) • [](https://lgtm.com/projects/g/andrelmlins/svelte-github-login/context: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](https://github.com/sveltejs/sapper-template#using-external-components).
## Demo [Link](https://svelte-github-login.netlify.com/)
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:
```js
import GithubLogin from "svelte-github-login";
console.log(params)}
on:error={error => console.log(error)}
let:onLogin
>
Github Login
```
## Properties
Raw component props (before transform):
| Prop | Type | Description |
| ----------- | ------ | --------------------------------------------------------------------------- |
| clientId | string | Client ID for GitHub OAuth application |
| scope | string | A space-delimited list of permissions that the application requires |
| redirectUri | string | Registered redirect URI for GitHub OAuth application |
| state | string | Value created by the maintenance state between the request and the callback |
| allowSignup | string | Option of unauthenticated users to register |
| login | string | Suggests a specific account to use for signing in and authorizing the app. |
## Events
| Prop | Type | Description |
| ------- | ---- | ----------------- |
| success | func | Call with success |
| error | func | Call with error |
| request | func | Call with offset |
## Slot Properties
| Prop | Type | Description |
| ------- | ---- | -------------- |
| onLogin | func | Call for login |
## NPM Statistics
Download stats for this NPM package
[](https://nodei.co/npm/svelte-github-login/)
## License
Svelte Github Login is open source software [licensed as MIT](https://github.com/andrelmlins/svelte-github-login/blob/master/LICENSE).