The SSH host key has changed on 8 April, 2022 to this one: SHA256:573uTBSeh74kvOo0HJXi5ijdzRm8me27suzNEDlGyrQ
A TOTP-based authenticator for the GNOME platform, inspired by the Google Authenticator.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

42 lines
1.2 KiB

namespace GAuthenticator {
[GtkTemplate (ui = "/eu/polonkai/gergely/gauthenticator/otp-row.ui")]
class OTPRow : Gtk.Grid {
private Gtk.Label code;
private Gtk.Label provider_name;
private Gtk.Label account_name;
public string secret {get; set;}
public string provider {get; set;}
public string account {get; set;}
private OTP.TOTP generator;
public OTPRow(string secret, string provider, string account) {
Object(secret: secret, provider: provider, account: account);
generator = new OTP.TOTP(secret, 6, GLib.ChecksumType.SHA1, 30);
public void update(bool first = false) {
uint64 val;
// FIXME: The first run is OK, but the rest is behind one cycle
if (first) {
val =;
} else {
var dt = new GLib.DateTime.now_utc();
val =, 1);