Skip to content

Align BankID app autostart with current BankID guidelines - #548

Draft
torselden wants to merge 3 commits into
mainfrom
pr-526-improved
Draft

Align BankID app autostart with current BankID guidelines#548
torselden wants to merge 3 commits into
mainfrom
pr-526-improved

Conversation

@torselden

Copy link
Copy Markdown

Updates how Active Login launches the BankID app so it follows BankID's current autostart guidance. Autostart is the default on all supported devices, the recommended universal/app link is used on mobile, and the manual launch button is only shown as a fallback where a browser actually requires user interaction.

This PR fixes #534

High level overview of this PR

  • Use the universal/app link (https://app.bankid.com/) for all iOS and Android browsers, and keep the bankid:/// scheme for desktop
  • Launch the app via BankID's recommended anchor-click with referrerPolicy="origin" instead of window.location.href (fixes unreliable iOS universal-link launch)
  • Restrict the manual "start BankID" fallback button to Android browsers that require a user gesture (Chrome, Edge, Samsung Internet, Brave); keep autostart automatic on iOS and on Android Firefox/Opera

These things have been implemented (when relevant)

  • Code written
  • Test added — launcher tests for app-link vs scheme selection, the user-interaction matrix, and redirect parameter behavior (Android redirect=null, iOS Safari return URL, iOS Chrome/Firefox browser scheme, iOS Edge/Opera redirect=null)
  • Documentation updated / written — added a "How the BankID app is launched" section and a mobile browser-support note in bankid.md

Backwards-compatibility note
This PR changes the launch URL selection for several device/browser combinations (no public API changes):

  • CanUseAppLink no longer restricts the app link to Safari-on-iOS and Chrome/Edge-on-Android ≥ 6 — it now applies to every iOS and Android browser. The DeviceOsVersion.MajorVersion >= 6 guard was removed.
    As a result, iOS non-Safari (Chrome, Firefox, Edge, Opera) and Android Firefox/Opera / older Android now receive https://app.bankid.com/… where they previously received bankid:///…. This matches current BankID guidance and should improve reliability.

  • The manual "start BankID" fallback button is now scoped to restricted Android browsers instead of a broader set.
    What consumers should verify: if you relied on the old scheme-based launch for a specific browser, that path changes. Android Firefox/Opera in particular should be verified on real devices, since their historical app-link/intent handling has been inconsistent. Custom IBankIdLauncher / IBankIdSupportedDeviceDetector implementations are unaffected, and the deprecated redirect query parameter is still emitted, so BankID app compatibility is preserved.

urizen-source and others added 3 commits August 20, 2026 08:38
…vice

Keep autostart as default on iOS; limit manual-launch fallback to restricted Android browsers

Restores autostart as the default per BankID's autostart guidance and scopes the user-interaction fallback to Android browsers that block app launch without a user gesture (excluding Firefox/Opera). Keeps the app-link URL and anchor-based launch from #526. Adds launcher tests for URL selection and interaction behavior.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Review how Active Login performs autostart of the BankID security application

2 participants