setup2FAWithHttpInfo method
Initialize 2FA setup
Generates a new TOTP secret and returns a QR code URL for authenticator apps. The 2FA is not enabled until confirmed with a valid code.
Note: This method returns the HTTP Response.
Implementation
Future<Response> setup2FAWithHttpInfo() async {
// ignore: prefer_const_declarations
final path = r'/api/v1/auth/2fa/setup';
// ignore: prefer_final_locals
Object? postBody;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>[];
return apiClient.invokeAPI(
path,
'POST',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}