Aegis is an unusual app to troubleshoot, because almost nothing about a refused code is the app's fault. It has no network access, no server, no account and no settings that could silently reinterpret what a service asked for. That narrows the list of causes sharply, and it also means the usual advice for other apps does not transfer.

The most useful thing to know is this: Aegis does have a clock warning, and it will not fire in the situation that most often breaks codes. This page starts there, then works through the causes that survive a correct clock, which for this app are a small and specific set. For the general version across any app, 2FA code not working: causes and fixes, in order is the full guide, and Google Authenticator code not working covers a very different app with a very different failure list.

The short answer

Check your phone's clock against real time rather than against the setting. Aegis reads the operating system clock and has no correction of its own, and its built-in warning only appears when Android's automatic time setting is switched off, so a phone that is set to automatic and has drifted anyway gets no warning at all.

If the clock is genuinely right, stop looking at the app. The cause is almost certainly a second, dead entry for the same account, the next-code preview, or a secret that was typed rather than scanned.

Aegis has no clock of its own, and that is on purpose

Two phones, one showing a time warning and one silent while its clock drifts
The warning is tied to the automatic-time setting, not to the actual time, which is why a drifting phone can pass it quietly.

When Aegis sees that Android's automatic time synchronisation is turned off, it says so directly: "Aegis relies on the system time to be in sync to generate correct codes. A deviation of only a few seconds could result in incorrect codes. It looks like your device is not configured to automatically synchronize the time. Would you like to do so now?" (Aegis). Answering yes opens Android's date and time settings. That is the entire extent of the app's involvement with time.

The catch is in what triggers it. The check reads Android's automatic-time setting and nothing else, so it fires when that setting is off, and stays silent when it is on. A phone set to automatic whose clock has nevertheless drifted, because the network time was never fetched, because the device was offline for a long stretch, or because the manufacturer's implementation is unreliable, produces wrong codes and no warning whatsoever. That is the common case, and it is exactly the case the warning cannot see.

There will not be a setting to fix this inside Aegis either, and the project has said why twice. Closing a request for time synchronisation, the maintainers wrote: "Adding time sync functionality to the app itself would require us to request the internet permission, and we don't have plans to do so" (Aegis issue 785). A later request for a manual time offset was closed with a measurement worth repeating: "The clock on your device will quickly start drifting if you disable synchronization. So much so that within just a week of having disabled synchronization the clock on my device already drifted away from reality by ~10 seconds" (Aegis issue 1502).

So the fix is in Android, every time:

  • Settings, System, Date & time, then Set time automatically along with the network-provided time zone.
  • If it is already on, switch it off and back on to force a fresh fetch, then compare against an external reference rather than trusting the toggle.

The project's own troubleshooting advice points at a reference clock for precisely this reason, and the clock check does the same comparison in the browser without sending anything anywhere. For how much drift a verifier actually tolerates before codes start failing, the clock section of the main guide has the numbers.

When one service refuses and everything else is fine

Two identical looking rows for the same account, one live and one retired, side by side
Add suffix keeps both entries. Only the newer secret is live, and nothing in the list says which one that is.

Run the ten-second diagnostic before anything else: open a different account at a different service. Codes refused everywhere means the device or the clock. Exactly one service refusing means that entry, and for Aegis there are three ways an entry goes bad.

A dead twin from a second enrolment. Aegis notices when you add an account it already has, and asks what to do: "This entry has the same name and issuer as one or more existing entries. How would you like to proceed?", offering Overwrite existing entry/entries or Add suffix (Aegis). Add suffix is the safe-sounding option and it is usually the wrong one, because scanning a fresh QR at a service issues a new secret and quietly retires the old one. The retired entry notices nothing. It keeps counting down and keeps producing well-formed digits that no longer match anything. Two entries for one service is therefore the answer you want rather than a problem: sign in with the other one, then delete the dead entry, in that order.

The next code, copied instead of the current one. Aegis has a setting described as "Generate and show the next code ahead of time" (Aegis). It is genuinely useful when a code is about to expire, and it puts a perfectly valid-looking six digits on screen that the service will refuse for another half minute. If your codes fail intermittently rather than consistently, check whether this is on and which number you are reading.

A secret typed rather than scanned. The field truncates visually, which hides the problem. Answering a report of codes that worked in Aegis but not elsewhere, the maintainers asked: "Are you sure you have completely copied over the secret? The textfield of the secret becomes horizontally scrollable when the secret is too long to show" (Aegis issue 1508). The same applies in reverse when the secret went into Aegis by hand.

What Aegis honours, and why that rules things out

With some apps a refused code can come from the app ignoring what the QR code asked for. Google Authenticator is the clear example: its own specification says the algorithm, digits and period parameters are ignored by its implementations, so an eight-digit or SHA-256 account scanned into it is refused for ever with nothing on screen to explain why.

Aegis does not have that failure mode, and that is worth knowing because it removes a whole branch of the diagnosis. Its vault format documents support for SHA-1, SHA-256 and SHA-512 for both HOTP and TOTP (Aegis vault format), the entry editor exposes the hash function, digit count and period as editable fields, and the code accepts anything from one to ten digits and any positive period. Steam's non-standard scheme is handled as its own type, alongside mOTP.

Which also means that if you have edited those fields, you are now the most likely cause. Aegis will happily generate a SHA-512 eight-digit code for a service expecting six digits on SHA-1, and every one of them will be refused. The project's FAQ is clear about where the choice belongs: "The hash algorithm is imposed by the service you're setting up 2FA for (e.g. Google, Facebook, GitHub, etc). There is nothing we can do about that. If we were to change this on Aegis' end, the tokens would stop working" (Aegis FAQ). Put the advanced fields back to what the QR code set, which for almost every service is SHA-1, six digits, thirty seconds.

One more thing this app cannot be blamed for: rate limiting. Aegis has no internet access, so every lockout you hit belongs to the service you are signing in to, not to the authenticator. Retrying a code that was refused for a real reason spends that service's budget rather than Aegis's.

When no Aegis code will ever work

If the clock is right, there is one entry, the advanced fields are untouched and the secret was scanned, then the secret you hold is simply not the secret the service holds. Nothing in the app can reconstruct it.

  1. Spend a backup code. They exist for this, because they are a bypass rather than a second copy of the factor. Where to store your 2FA backup codes covers what to do the moment you spend one.
  2. Look for a second factor you forgot you had — another authenticator, a security key, a browser still signed in. An active session is often enough to enrol a new app without any formal recovery.
  3. Use the service's own recovery. Lost your phone? How to get your authenticator codes back sets honest expectations per service.

Worth separating from all of the above is the other way Aegis users lose codes, which is the vault rather than an entry. Aegis encrypts with AES-256-GCM and a scrypt-derived key, backups and exports are the same encrypted file, and that file opens with your vault password and nothing else. The project recommends against disabling its password reminder for the obvious reason: "forgetting your password will result in loss of access to the contents of the vault" (Aegis FAQ). There is no reset, and there is no project-side recovery, because there is no project-side anything. If the vault is shut, the route back is each service's own recovery, one at a time.

Where KeyNesta fits, and what it cannot do

KeyNesta cannot set your clock either. It reads the device clock the same way Aegis does, so when the clock is wrong the fix is in the operating system, here as anywhere.

Where it differs is the thing Aegis deliberately will not do. Aegis has no internet permission at all, which is the source of both its best property and its sharpest edge: cloud backup works only if your provider's app fully implements Android's Storage Access Framework, and the project is explicit that "Aegis doesn't have access to the internet and we don't have plans to change this" (Aegis FAQ). KeyNesta syncs an end to end encrypted vault instead, and runs in a browser as well as on a phone, which is a different set of trade-offs rather than a better one. The most private authenticator app compares them honestly, including where Aegis wins.

If you do want to move, this is one of the easy ones. The import page reads Aegis JSON exports directly, provided the export is unencrypted, and issuer, account name, secret, algorithm, digits, period and HOTP counters all carry across, with Aegis groups becoming KeyNesta tags. Import from Aegis and 2FAS walks through it, and moving Aegis to a new phone covers the same file when the destination is another Aegis install. Export unencrypted only on a device you trust, import it at once, and delete the file: it holds every one of your secrets in the clear.

What KeyNesta cannot do is recover anything, for exactly the reason Aegis cannot. Sync is zero-knowledge, so the server holds ciphertext and no key that opens it, and a forgotten passphrase is the same dead end a forgotten vault password is.

Frequently asked questions

Does Aegis have a time sync or time correction setting?

No, and it is not coming. Aegis reads the operating system clock, and the maintainers have closed requests for both automatic synchronisation and a manual offset, because either would mean requesting the internet permission the app deliberately does not hold. The only in-app action is a dialog that sends you to Android's own date and time settings.

Why did Aegis not warn me that my phone clock had drifted?

Because the warning checks Android's automatic-time setting rather than the time itself. It appears when automatic time is switched off. A phone set to automatic that has drifted anyway, after a long stretch offline or on an unreliable implementation, generates wrong codes silently. Compare against an external reference instead of trusting the toggle.

Does Aegis support SHA-256 or eight-digit codes?

Yes. The vault format documents SHA-1, SHA-256 and SHA-512, the code accepts one to ten digits and any period, and Steam and mOTP have their own types. That makes ignored parameters a non-cause in this app, unlike some others, but it also means hand-edited advanced fields are a real cause: set them back to whatever the QR code specified.

What happens if I scan the same account into Aegis twice?

Aegis spots it and offers to overwrite the existing entry or to add a suffix and keep both. Keeping both is the usual choice and the usual mistake, because enrolling again at the service issues a new secret and retires the old one. The leftover entry keeps producing valid-looking digits that will never be accepted again.

Can an Aegis vault be recovered if the password is forgotten?

No. The vault is encrypted with a key derived from that password, there is no server holding a copy and no project-side reset, which is why the app keeps nagging you with a password reminder. With the vault shut, the way back is each service's own recovery, account by account.

Takeaway

Verify the clock against real time, not against the switch that claims to manage it, because Aegis warns you about the switch and the switch is not the thing that breaks codes. Then run the one diagnostic that halves the problem: everything failing points at the device, one service failing points at that entry. For this app that short list is a retired twin left behind by Add suffix, the next-code preview handing you digits that are not live yet, a secret that was typed and truncated, or advanced fields that were edited away from what the service asked for. And keep the vault password somewhere the vault is not, because that is the one failure no amount of troubleshooting reaches.

Sources