Login with ScryptaID
This tool is useful if you need to easily implement a login system with Scrypta. By default the tool produces an UI where the user can enter with:
- Manent App: by usign the remote signing tool
- Sid File: manually import previoysly stored .sid file
- QR card: using a printed card
You can even choose what kind of identities the user must have so you can recognize him as a qualified user or leave the required attribute blank to allow anonymous users.
How to use it
First of all you need to include it in your project by including the
scrypta.login.min.js file like:
You can even use the IPFS version, the hash is:
QmZZVKCYK6v9RHrZkyPUoQH6hEHcNC7W8igULzzWGCp4kM like this:
Then you need to write the rendering html, where you want to render the button:
<div id="scrypta-login" dapp="Demo dApp" callback="testCallback" required="phone"></div>
You can customize the login process by including these attributes:
- dapp: customize showed title
- callback: call the given callback when the login is successful, is required if you include one or more required identities, the return object will include it
- required: the list of required identifiers separated by a comma (ex. phone,mail,ethereum,twitter)
- gateway: if you want to admit one or more identity gateways, in this case you need to insert one or more pubkeys (ex.
Test the project
If you want to test it you can simply download the package with
git clone, install all dependencies with
npm install and run the development enviorment with
npm run dev.
Check the integrity with the blockchain
If you need to check the integrity of the file please use
scrypta-bvc tool as documented here: https://github.com/scryptachain/scrypta-blockchain-versioning-cli.
All the updates will be uploaded at https://proof.scryptachain.org/#/address/LiRXTmP4fe8Q3C3c9VtzzPHaxhMWnVRpTh
Check out this link to run a simple demo, available even at