Sign-in codes in notifications
A letter with a code to sign in — GitHub, Google, a bank — rings with the code right in the notification, and a button copies it. Where it is switched on, what happens in the trash and spam, and when no code comes.
Many services send a code to sign in by e-mail: GitHub's "Please verify your device", Google, Microsoft, a bank, a shop. With this function the code comes right in the push notification — you read it on the lock screen or at the top of the screen and type it in, without opening the letter.
What you see
- The notification's title says whose code it is — Sign-in code · GitHub — and its first line is the code itself, the letter's subject under it.
- The button Copy the code opens a small page with the code large; the code is copied by itself when the browser allows it, else press Copy the code there. Chrome on Android and on a computer show the button; an iPhone shows none — tap the notification, the letter opens.
- A tap on the notification opens the letter.
The code comes whatever folder the letter was sorted into: the Smart Inbox's newsletters or notifications, Unknown senders (a new sender), one of your folders. Such a letter does not ring a second time as "new mail".
In the trash or spam — only a warning
When the letter landed in the trash or in spam, the notification does not show the code. It says A sign-in code may be in Spam (or in the Trash) and from whom. Open the letter and check it: a code you did not ask for is somebody trying to sign in to your account — never give it to anyone.
The code IS shown from the trash or spam when you let that sender in before (the Let in button of Unknown senders). Mail sent to spam or the trash by your own black list or rule gives no notification at all.
Switching it on and off
It is on by default. Mail → the gear ⚙ → Notifications (/mail/settings/notifications) → Sign-in codes in notifications.
Push notifications must be on for the device: the block Push notifications on this device on the same page (Notifications of new mail).
The code is visible on the locked screen too, as any notification. If somebody else may see your phone, switch the function off, or hide the notifications' content on the lock screen in the phone's settings.
When no code comes
- The letter is older than 15 minutes when Mail reads it — such a code has usually run out, so it does not ring. With a mailbox whose server announces new mail at once it comes in seconds (How new mail arrives).
- The letter was already read in another program before Mail saw it.
- Mail did not recognise it: the subject must say it is a code (for example "verification code", "sign-in code", "код подтверждения") and the text must hold the code — 4–8 digits or 6–8 capital letters and digits. A letter that only has a link, or asks to open an app, has no code to show.
- Push notifications do not come at all — see When nothing comes.
- The function may be switched off for everyone by the site's administrator.