Porting from PnP Web SDK to SFA Web SDK

We are currently using PnP Web SDK with openlogin adapter and email_passwordless login.
Current code looks like this

Web3Auth Initialization Code

const web3AuthInstance = new Web3AuthNoModal({
chainConfig,
clientId,
sessionTime,
})
const adapterSettings: any = {
network: web3AuthNetwork,
clientId,
}
const privateKeyProvider = new EthereumPrivateKeyProvider({
config
})
const adapter = new OpenloginAdapter({
adapterSettings: { network: web3AuthNetwork },
privateKeyProvider,
})
web3AuthInstance.configureAdapter(adapter)
await web3AuthInstance.init()
Login Code
await web3Auth.connectTo(adapter, {
“email_passwordless”,
“user@test.com”
})

Now with SFA Web SDK, don’t see any function as configureAdapter.
Also I see the connect() function which accepts verifier information, what do I specify here ? There is no verifier configured at the dashboard in the current implementation, and will prefer the same way without any additional complexity.

I believe with PnP Web, an aggregated verifier “tkey-auth0-email-passwordless” is sort of pre configured without we requiring to configure it in the dashboard.
Looking for similar seamless implementation in case of SFA Web SDK also.

Please advise.

Hey, for the SFA Web SDK you can’t use default verifiers, you will have to create your own custom verifier. The default verifier has the client id and all the auth0 setup done by Web3Auth team which can’t be exposed. In SFA SDK you need to explicitly do login with Auth0, and then pass the JWT token to SFA Web SDK with verifier id, hence it’s not possible with default verifier.

1 Like