Documentation

Getting an identity or signing in with Scatter

Web
JSON

getIdentity allows your application to request permission to interact with a user's Scatter and be provided with an Identity of the user's choosing. You can equate requesting an Identity to signing in with Google or Facebook without a centralized server.

scatter.getIdentity(requiredFields).then(identity => {
    //...
}).catch(error => {
    //...
})

// The latest scatter-js will also allow using:
scatter.login(requiredFields)
{
    id:'random-uid',
    type:'getOrRequestIdentity',
    plugin:'Your App Name',
    payload:{
        origin:'domain' || 'YOUR_APP',
        fields:requiredFields
    }
}