Trigger the password reset process for any token belonging to the current user.
There are two use cases for the resetToken()
methods:
Forgot password
Login without a password
import io.blockv.common.internal.net.rest.exception.BlockvException
import io.blockv.core.client.manager.UserManager.TokenType
//reset token
blockv.getUserManager().resetToken(/*token,token-type*/)
Note: You can access the function through the UserManager
found in your blockv
singleton. See Getting Started
// blockv is the Blockv sdk singleton created in getting started
blockv.getUserManager()
.resetToken("john.doe@example.com", UserManager.TokenType.EMAIL)
.subscribe(() -> {/*Success*/},
throwable -> {/*Failure*/});
// blockv is the Blockv sdk singleton created in getting started
blockv.getUserManager()
.resetToken("+11234567890", UserManager.TokenType.PHONE_NUMBER)
.subscribe(() -> {/*Success*/},
throwable -> {/*Failure*/});