Log In
// Initialize provider
import Fortmatic from 'fortmatic';
import Web3 from 'web3';
const fm = new Fortmatic('YOUR_API_KEY');
window.web3 = new Web3(fm.getProvider());
fm.user.login().then(() => {
web3.eth.getAccounts().then(console.log); // ['0x...']
});
Customizing Login Behavior
Last updated
Was this helpful?