Settings in Keycloak
Documentation
On this page
All Okivo settings are in the same form as the credentials: in the admin console under Authentication → Flows, in the login flow on the Push MFA step via the gear icon. They apply to the whole realm and all stay in your Keycloak.
The field names appear in the language of the admin console (English or German); below they are given in English.
Overview of the settings
| Field | Default | In short |
|---|---|---|
| Relay Base URL, Tenant ID, Tenant API Key | – | Credentials from the portal, see Enter the credentials |
| Approval in the app | number |
Approval mode |
| Default when the user chooses | number |
applies with user as long as the user hasn't chosen |
| Code fallback | on | Code without push |
| Move to a new device | on | New phone |
| Include “Reset password” link | off | Password link after a denial |
| Custom address for it | empty | your own https page instead of “Forgot password” |
| Display name in the app | empty | Display name and logo |
| Logo URL | empty | Display name and logo |
| Show user in the app | on | Display name and logo |
| App link address | empty (https://okivo.app) |
For the button “Open in the Okivo app” on the setup page. Leave it empty. |
| Count denials | on | Analysing denials |
| GeoIP database (path) | empty | Location and risk |
| Ask for the browser location | off | Location and risk |
Approval mode
Under Approval in the app you decide how users approve a sign-in:
| Value | What the user does |
|---|---|
number |
Number matching (default): the sign-in page shows one number, the app three to choose from. |
approve |
Just approve or block, in the app with a swipe. |
adaptive |
Swipe while the sign-in looks unremarkable, otherwise number matching. Needs Location and risk; without that feature number matching always applies. |
user |
Each user chooses in the app. Until then your Default when the user chooses applies. |



Number matching, approving with a swipe and – at high risk, in every mode – a warning first.
Number matching protects against approving a request out of habit or by mistake: only someone looking at the sign-in page knows the right number.
RADIUS sign-ins (VPN, Wi-Fi) are always a plain approval regardless of this setting, because no page can show a number there.
Code without push
If no notification arrives, the user expands “No notification?” on the sign-in page and enters the six-digit code the app shows in the “Codes” tab. The code is generated on the phone and needs no connection.

- The secret for it is created when the device is set up. Devices set up earlier fetch it automatically at their next sign-in.
- Each code works once; after five wrong entries the sign-in ends.
- Code fallback switches this off for the realm.
- RADIUS sign-ins have no code.
Recovery codes
If a user loses their phone, they need another way into their account. Keycloak brings its own Recovery Authentication Codes for this. Okivo works together with them: the user is offered the push first and can enter a recovery code under “Try Another Way”. Okivo sets up sign-in to its own portal the same way.
Instead of putting “Push MFA” as Required into the sub-flow “forms”, use the sub-flow for the conditional second factor that the copied browser flow already contains (in Keycloak 26 “… Conditional 2FA” or “… Conditional OTP”):
- Authentication → Required actions: enable “Recovery Authentication Codes”.
- In the sub-flow for the second factor, add the steps Push MFA and Recovery Authentication Code Form.
- Requirements: “Condition - user configured” = Required, Push MFA = Alternative, Recovery Authentication Code Form = Alternative, all other steps (OTP, WebAuthn …) = Disabled – unless you want to keep offering them.
- Order: condition, then Push MFA, then Recovery Authentication Code Form.
Caution: This sub-flow only runs for users who already have a second factor set up. Users without a
device sign in there with just their password until they have set up Okivo. Make sure they do: with an
invitation, by assigning them the required action push-mfa,
or with Set as default action for newly created users. Applications can also request the setup with
kc_action=push-mfa.
Users create their recovery codes through the required action “Recovery Authentication Codes” (assigned by you or via the Keycloak account console). They should print the codes or store them in a password manager.
Password link after a denial
If a user blocks a sign-in, someone probably knows their password. With Include “Reset password” link the app offers to change it right away. Without this setting the app suggests nothing.

The default is Keycloak's “Forgot password” page. It must be allowed in the realm (Realm settings → Login → Forgot password), otherwise the plugin sends no link. Under Custom address for it you can enter your own https page instead.
Display name and logo
This is how the realm appears in the app. Without an entry, Display name in the app uses the realm's display name. For the Logo URL you have two options:
- Your own address: an https address of a square PNG or JPEG. The app loads it directly from there; nothing goes through Okivo.
- Upload in the portal: upload it for the realm under “Logo in the app” (at most 256 KB) and enter the address shown in Keycloak. The app then loads the image from okivo.app.

If the logo doesn't load, the app shows the initials of the name. Users can also rename an account in their app.
Below the name, the app shows the user's email address, or the username if there is no email. This tells several accounts of the same realm apart, for example a normal and an admin account. It goes directly from your Keycloak to the user's device, never through the push service. With Show user in the app off, the app shows only your Keycloak's address instead; existing devices pick this up with the next request.
Location and risk
Plan feature, from the Team plan on.
With this feature the app shows the estimated location of a sign-in on a map and assesses whether it fits the previous ones: known country, known browser, plausible distance to the last sign-in. At high risk it warns before the user can approve. How the assessment works is described in Security and privacy.
- Geolocation in your Keycloak. The location is estimated from the IP address inside your Keycloak,
without any third-party service. The image
okivo/keycloak-distcontains the free database DB-IP City Lite and renews it monthly. If you only install the JAR, download it yourself from db-ip.com and enter its path (next point). It is coarse at city level, so the app then shows region and country with ±25 km. - More precise locations: Buy a commercial database in
.mmdbformat for your server – for example DB-IP “IP to Location”, MaxMind GeoIP2 City or IPinfo – and enter its path under GeoIP database (path). The app then shows the city and the database's accuracy. The file can be replaced during operation, for example monthly via cron; the plugin then reads it again. The free MaxMind GeoLite2 is only licensed for internal purposes and therefore not supported. The IP2Location BIN format is not supported, but IP2Location in MMDB format is. - Reverse proxy: Keycloak must see the user's real address. Behind a reverse proxy, set
KC_PROXY_HEADERSaccordingly (xforwardedorforwarded); otherwise every sign-in gets the proxy's address. - History: For the comparison the plugin keeps the last 20 approved sign-ins per user: country, location and coordinates, browser, and IP address and network only as a checksum. This data stays in your Keycloak. From a known network, a different location triggers no hint. Blocked sign-ins don't go into the history.
- Same network: If the phone fetches the request from the same network the browser is in, the app shows “Same network as this phone”. Without this plan feature the app shows neither location nor hints; it then only detects sign-ins from a local (private) network.
- Ask for the browser location: The waiting page asks the browser for its location. The app compares it with the location of the IP and – if the user has switched on the location check – with the phone. Declining is fine; a matching location never lowers the assessment, a distant one raises it. Keycloak rounds the location to about 1 km and stores it only with the running request. It is still location data of your users: mention the request in your privacy policy.
- Attribution: If you use DB-IP City Lite, its licence (CC BY 4.0) requires the attribution “IP Geolocation by DB-IP”; the app shows it.
New phone
Users move their accounts in the app themselves: the old phone hands over to the new one, without a new sign-in and without your involvement. The key is not copied – the new device creates its own, and your Keycloak removes the old one as soon as the new one is set up. The guide for users is in The Okivo app.
- The old device identifies itself with its signature and requires fingerprint or face. So whoever has a device that may approve sign-ins may also replace it – nothing more.
- Move to a new device switches this off for the realm. A new device is then only possible through the sign-in or your invitation.
- Every move is recorded in Keycloak's events (
UPDATE_CREDENTIAL, detailpush_mfa_replaced_device). - If the old phone is lost or broken, moving doesn't help: the user signs in with a recovery code, or you remove the old device under Users → (user) → Credentials and invite them again.
Analysing denials
You can see for which users sign-ins were not approved – a hint at guessed passwords or at users who struggle with the app. The analysis lives exclusively in your Keycloak; Okivo learns nothing about it.
- Events: Every sign-in carries the detail
push_mfa_outcome(approved,otp,denied,number_mismatch,expired,otp_rejected) andpush_mfa_mode(numberorapprove) in Keycloak's events. Denials appear asLOGIN_ERROR. Events must be enabled in the realm (Realm settings → Events). - Counters: With Count denials the plugin keeps three numbers per user and day: denied, wrong number, expired – for 90 days, without time, IP address, location or device.
Query them through the Keycloak admin API:
GET /admin/realms/<realm>/push-mfa/deny-stats?days=30
{ "days": 30,
"totals": { "denied": 2, "numberMismatch": 0, "expired": 1 },
"users": [ { "userId": "0b9c…", "username": "max.muster", "denied": 2, "numberMismatch": 0, "expired": 1 } ] }
The call needs the token of a realm administrator with the view-users role.
DELETE /admin/realms/<realm>/push-mfa/deny-stats/<userId> (role manage-users) resets a user's counters.