0.2.0 • Published 1 year ago
spot-sign-in v0.2.0
spot-sign-in
Simple package to integrate Spot in your JavaScript application.
Spot is a service that allows you to integrate a REST API into your application to store user data in the cloud.
Learn how to use Spot in your project.
Installation
You can use this library as a <script>
tag from a CDN, or as a spot-sign-in
package on npm.
CDN
See the example file for more information.
<script src="https://unpkg.com/spot-sign-in"></script>
NPM
Available for server and client side.
# Using npm
npm install spot-sign-in
# Using yarn
yarn add spot-sign-in
Documentation
You can find the Spot documentation on the website.
Package
Check out the documentation file to use this package.
Example
You can find the full example using the CDN installation here
import { initialize, signInWithRedirect } from 'spot-sign-in'
initialize({
clientId: 'your-client-id',
})
const button = document.querySelector('#button')
button.addEventListener('click', () => {
// Launch the Spot authorization page
signInWithRedirect()
})