Skip to content

Exposing a method in AuthAPI to delete MFA authenticators. #539

@vasantteja

Description

@vasantteja

Checklist

  • I have looked into the Readme and Examples, and have not found a suitable solution or answer.
  • I have looked into the API documentation and have not found a suitable solution or answer.
  • I have searched the issues and have not found a suitable solution or answer.
  • I have searched the Auth0 Community forums and have not found a suitable solution or answer.
  • I agree to the terms within the Auth0 Code of Conduct.

Describe the problem you'd like to have solved

We have the methods in AuthAPI to add and list oob and otp authenticators. It will be nice to have a method to delete those authenticators.

Describe the ideal solution

public Request<Void> deleteAuthenticator(String accessToken, String authenticatorId) {
    Asserts.assertNotNull(accessToken, "access token");
    Asserts.assertNotNull(authenticatorId, "authenticatorId");

    String url = baseUrl
        .newBuilder()
        .addPathSegment("mfa")
        .addPathSegment("authenticators")
        .build()
        .toString();

    VoidRequest request = new VoidRequest(client, null, url, HttpMethod.DELETE);
    request.addHeader("Authorization", "Bearer " + accessToken);
    request.addParameter(AUTHENTICATOR_ID, authenticatorId);
    return request;
}

Alternatives and current workarounds

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requestA feature has been asked for or suggested by the community

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions