Pular para o conteúdo

OkYouIn web app push

OkYouIn’s own push factor is a small web app that users install on their phone from your OkYouIn server — no app store, no vendor account, no cloud service of ours in between. Sign-in requests arrive as notifications. The user opens one, sees which application and address are asking, taps the number shown on the sign-in screen and confirms with fingerprint, Face ID or the device PIN.

In the console this provider is called Web Push.

  • Passkey-signed approvals. Pairing creates a passkey on the phone. Every Approve, Deny or report is signed with it, so only that phone — unlocked by its owner — can answer. A stolen notification or request ID is useless.
  • Number matching. The sign-in screen shows a two-digit number; the phone offers three and the user must tap the right one. Approving by habit, or approving someone else’s sign-in, stops working.
  • Private payloads. The push services that deliver notifications (Google, Apple, Mozilla, Microsoft) only carry an encrypted message with an opaque request ID and the application’s name. User name, IP address and number are fetched by the app from your server.
  • “This wasn’t me”. The user can report a request they did not start: it is denied, any other waiting requests are cancelled, and the report is recorded for you.
  • Approving-device checks. The country of the phone that approves can be checked against the rule that allowed the sign-in, and optionally a UDP check catches a phone hiding behind a proxy. See The approving device and UDP check below.
  • A public HTTPS address for OkYouIn (Settings ▸ System ▸ General, base URL) that phones can reach. Passkeys and push only work in a secure context; the address must be a host name, not an IP address.
  • Outbound HTTPS from OkYouIn to the browsers’ push services.
  • On the user’s side: Android with Chrome, Edge, Firefox or Samsung Internet; iPhone or iPad with iOS / iPadOS 16.4 or later (the app must be added to the Home Screen — Apple delivers web push only to Home Screen apps); or a desktop browser.
  1. Open Settings ▸ System ▸ MFA Settings, card Provider Configuration, and switch on Web Push. If the base URL cannot be used, the card says so with a link to fix it.

  2. Click the provider to open Configure Web Push and review the settings below. The VAPID public key is generated automatically the first time; set VAPID subject to a contact address push services can reach (mailto:it@example.com or an https:// URL).

  3. Ask users to enroll (from My account, or with a setup link).

SettingDefaultMeaning
Number matchingonThe sign-in screen shows a number the user must pick on the phone. Applies to console sign-ins and to RADIUS applications whose MFA prompt mode is Challenge. Push only applications get a plain Approve / Deny — still signed with the passkey.
Offline code fallbackonThe app can show a one-time code to type when a notification does not arrive. Codes can be phished; number-matched push can’t — switch this off if you prefer. Turning it off refuses codes; turning it on again makes them work again.
Show the client IP on the approve pageonThe address of the sign-in, shown to the user on the phone.
Show the User-Agent on the approve pageonThe sign-in’s browser, shown on the phone.
Pairing link lifetime (seconds)600120 to 3600. Time to scan the QR code, install the app (iPhone) and allow notifications.

How long a request waits for an answer is the global Push Challenge Timeout (default 120 seconds) — see MFA overview.

Regenerate keys replaces the VAPID key pair. Every paired phone stops receiving requests and is removed; affected users must pair again. Use it only if the private key may have leaked.

The user starts in the console (My account ▸ Two-factor authentication ▸ Set up ▸ Web Push, or from a setup link). The console shows a QR code, the pairing link and a short 6-character code, with tabs for iPhone and Android, and follows the phone’s progress live: link opened → app installed → notifications allowed → done. Problems on the phone — notifications blocked, passkey cancelled — appear in the console with the fix.

  1. Scan the QR code with the camera, or open the link.
  2. Tap Enable sign-in requests. In one go the browser asks to allow notifications and to create a passkey (fingerprint, face or PIN).
  3. A test notification OkYouIn is ready arrives. Done.
  4. Optional: install the app to the home screen when offered. On Android the app is optional; the browser tab works too.

The app is served by your OkYouIn server and works offline for the offline code. A phone holds one pairing; enrolling again replaces it.

  1. The user signs in to an application. The sign-in screen (or the VPN client’s prompt) shows a two-digit number and waits.

  2. The phone shows Sign-in request — Sign in to (application) — tap to review. The lock screen shows nothing more.

  3. The approve page shows the application, the address and browser of the sign-in (per the settings), the time, and for (user) on (server).

  4. The user taps the number shown on the sign-in screen (Approve with number NN), or Deny, or This wasn’t me, and confirms with the passkey.

  5. The sign-in continues by itself.

A wrong number denies the request. If several sign-ins are started, a newer request replaces the older one. Opening the app shows any request still waiting, even if the notification was missed.

For RADIUS applications whose MFA prompt mode is Challenge, the VPN client shows the number in its prompt (“select number NN, then press Enter”); the user can also type the offline code into the same prompt. In Push only mode the sign-in simply waits for Approve.

With Offline code fallback on, the app has Show offline code: a 6-digit code that changes every 30 seconds, for when the phone has no connection or a notification does not arrive. Where the platform supports it, the codes are protected by the passkey, so showing one needs fingerprint, face or PIN. The user types the code where the sign-in asks for it — on the console and SSO sign-in pages, or into a RADIUS prompt. A code is accepted once, and never for a request the user reported.

SymptomCause and fix
No notifications on Android after installing the appAn installed app has its own notification permission. Open the app; it offers Allow notifications.
No notifications on iPhoneNotifications are off for OkYouIn: Settings ▸ Notifications ▸ OkYouIn ▸ Allow Notifications. The pairing must have been done in the Home Screen app, not in Safari.
This device was unlinkedAn administrator reset the user’s MFA, or the keys were regenerated. Tap Pair again with a new setup link.
The phone was replacedReset the user’s MFA and send a setup link. See Resetting a user’s MFA.

The app’s Diagnostics page (from the version line at the bottom of its home screen) shows versions, notification permission and push subscription state, with a Copy button for support, and offers Reset this app.

The approving-device country check looks at the address the approve page is loaded from. A phone can fake that address by sending its browser traffic through a proxy in an allowed country. The UDP check catches that: while the user reads the request, the app sends a few UDP packets straight to OkYouIn, and OkYouIn compares the country of the packets’ source with the country of the page’s HTTP address (by GeoIP). The packets are authenticated per request, so they cannot be forged, and the user notices nothing.

Configure it in Configure Web Push, section UDP check (STUN):

ModeBehaviour
Off (default)No check runs and nothing is recorded.
Record onlyThe check runs and its verdict is shown in the Access log; denies nothing. Start here and watch the verdicts.
Deny on mismatch (soft)Denies an Approve whose UDP packets came from another country than the approval page. An Approve without a UDP check, or whose country can’t be determined, passes.
Strict denyAlso denies an Approve without a UDP check or whose country can’t be determined — except when both sides are on the local network. Cannot be chosen while GeoIP is off.

Network requirement: phones send the check to UDP 3478 on your OkYouIn server’s public address. Allow it in the firewall and forward it through NAT. Public host and Public UDP port override the address phones use (empty = the base URL’s host). The Responder line shows whether OkYouIn’s UDP responder is running, and Test runs the check from your own browser and shows the address it arrived from.

What it catches: a browser whose web traffic goes through an HTTP(S) proxy, a browser-extension proxy or a per-app proxy while UDP leaves through the real connection.

What it does not catch: a full-tunnel VPN on the phone (UDP goes through it too); proxies that relay UDP, or a relay in an allowed country; a browser with WebRTC disabled; networks that block outbound UDP — the last two simply produce no check.

Normal differences are judged by country, so they pass: iCloud Private Relay, Chrome IP Protection and carrier-grade NAT can give HTTP and UDP different addresses in the same country; IPv6 for HTTP and IPv4 for UDP is normal too.

The check has been tested with desktop Chromium; behaviour on Android and iOS phones is not yet verified — use Record only to see how your users’ phones fare before enforcing it.

When an Approve is turned into a denial, the user sees only “This approval could not be verified. Contact your administrator.” — never a country or address. The verdict, both addresses and countries are on the event in the Access log.