fix(auth): don't export display

This commit is contained in:
Prateek Sunal 2024-05-07 19:25:00 +05:30
parent 7628991dad
commit 851c04f714
2 changed files with 5 additions and 1 deletions

View file

@ -243,6 +243,10 @@ class Code {
throw UnsupportedError("Unsupported format with host ${uri.host}"); throw UnsupportedError("Unsupported format with host ${uri.host}");
} }
String get rawDataWithoutDisplay {
return "otpauth://${type.name}/$issuer:$account?algorithm=SHA1&digits=$digits&issuer=$issuer&period=30&secret=$secret";
}
@override @override
bool operator ==(Object other) { bool operator ==(Object other) {
if (identical(this, other)) return true; if (identical(this, other)) return true;

View file

@ -174,7 +174,7 @@ Future<String> _getAuthDataForExport() async {
final allCodes = await CodeStore.instance.getAllCodes(); final allCodes = await CodeStore.instance.getAllCodes();
String data = ""; String data = "";
for (final code in allCodes.codes) { for (final code in allCodes.codes) {
data += "${code.rawData}\n"; data += "${code.rawDataWithoutDisplay}\n";
} }
return data; return data;