Connect to Blocto Wallet
Connecting to wallet is being called authentication or authn in FCL
Simple Login
when (val result = Fcl.login()) {
is Result.Success -> {
val address = result.value
}
is Result.Failure -> {
// Handle error
}
}Account-proof Login
val accountProof = AccountProofResolvedData(
appIdentifier = "YOUR_FLOW_APP_IDENTIFIER", // human-readable string i.e. the name of your app
nonce = "75f8587e5bd5f9dcc9909d0dae1f0ac5814458b2ae129620502cb936fde7120a" // minimum 32-byte random nonce as a hex string
)
// suspending function
when (val result = Fcl.authenticate(accountProof)) {
is Result.Success -> {
val address = result.value
}
is Result.Failure -> {
// Handle error
}
}
// Once you've authenticated with provided data,
// you can access account proof data
val userAccountProofData = Fcl.currentUser?.accountProofDataVerify Account Proof
Last updated
Was this helpful?