The Fortmatic SDK offers it's own method for showing users just their Fortmatic wallet's public address.
// Initialize provider
import Fortmatic from 'fortmatic';
import Web3 from 'web3';
const fm = new Fortmatic('YOUR_API_KEY');
window.web3 = new Web3(fm.getProvider());
Users will be prompted to login into their Fortmatic account, after which they'll see their public address and balance:
Last modified 3yr ago