Login

A popup that lets you select a saved account is active on eostock(Chrome Extension), which allows you to login.

const eosTock = window.eosTock;
// Only corresponding accounts on the networks can be selected to login.
const networks = [{
httpEndpoint: 'http://dev.cryptolions.io:38888',
chainId: '038f4b0fc8ff18a4f0842a8f0564611f6e96e8535901dd45e43ac8691a1c4dca'
},{
httpEndpoint: 'https://api-kylin.eosasia.one',
chainId: '5fff1dae8dc8e2fc4d5b23b2c7665c97f9e9d8edf2b6485a86ba311c25639191'
}];
window.eosTock.login(networks).then(identify => {
//..
}).catch(error => {
//..
});

Parameter (Array - networks)

The Login's Parameter's networks are the info for calling the accounts on the blockchain. Once important here is not httpEodpoint but chainId. (Please check using chainId.)

[
{
httpEndpoint: 'https://api-kylin.eosasia.one',
chainId: '5fff1dae8dc8e2fc4d5b23b2c7665c97f9e9d8edf2b6485a86ba311c25639191'
},
{
httpEndpoint: 'https://proxy.eosnode.tools',
chainId: 'aca376f206b8fc25a6ed44dbdc66547c36c6c33e3a119ffbeaef943642f0e906'
}
]

Return (Promise)

Return is Promise-based. account is the Eos account name, and ssoToken allows you to use it when logging in on the server.

{
account: '' // account name - String
ssoToken: '' // sso token - String
}