Summary: Deep linking in the 7Mind mobile app uses the app_links package for URI capture and the Adjust SDK for shortlink resolution on iOS. Schemes vary by flavor, universal links run through the Adjust domain sevenmind.go.link, a /login link can carry a full session (magic login link), and a route alias exists specifically to handle Aury webview links.
Sources: direct code inspection (lib/app/routes/deep_link_handler.dart, lib/app/app_module.dart, android/app/build.gradle in 7mind-mobile-apps-monorepo; commit bf75eb2ce); re-checked against origin/main at 4.0.9 on 2026-11-09 (lib/app/routes/magic_login_link.dart, ios/Runner/Runner.entitlements, android/app/src/*/AndroidManifest.xml, MainActivity.kt, PR 1544 for MIND-815)
Last updated: 2026-11-09
URL schemes by flavor
Configured at the Android flavor level (android/app/build.gradle:96-117):
| Flavor | Scheme | App ID |
|---|---|---|
| production | sevenmind | de.sevenmind.android |
| staging | sevenmindstg | de.seven_mind.android.stg |
| zpp | sevenmindstg | de.seven_mind.android.stg |
iOS schemes are declared in ios/Runner/Info-production.plist and Info-staging.plist ($(DEEPLINK_SCHEME)) and match the same naming.
Universal links
- iOS associated domains (
ios/Runner/Runner.entitlements):applinks:sevenmind.go.linkandapplinks:4bw6.adj.st, both Adjust link domains. - Android: a verified app link intent filter for
httpandhttpsonsevenmind.go.linkin the manifests.
Examples of links the handler resolves: sevenmind://monetization/false/false (push, in-app message, content card) and https://sevenmind.go.link/monetization/false/false?adj_t=... (Adjust) both open the paywall. A content collection opens with sevenmind://navbarRoutes/libraryRoot/collection/<id>.
Capture and dispatch
lib/app/routes/deep_link_handler.dart uses the app_links package to:
- Read the initial link the app was launched from
- Subscribe to a stream of incoming links while the app runs
- Queue links arriving before
markAppReady()is called, so deep links that fire during splash do not get dropped - On iOS only, route URIs that do not start with
sevenmindthrough AdjustprocessAndResolveDeeplinkfirst, to resolve shortened tracking links into their underlying app URL - Check for a magic login link before converting the URI into a route (see below)
On Android, MainActivity also passes every incoming intent to Adjust.processDeeplink (in onCreate and onNewIntent) so Adjust records the click. The URI itself reaches Dart unchanged.
Magic login link (MIND-815)
A /login link that carries a full session signs the user in instead of opening the login screen, so CRM can put a one-tap login button in an email. Parsed in lib/app/routes/magic_login_link.dart, live since app 3.3.28.
- Shape:
sevenmind://login?access_token=..&id_token=..&refresh_token=.., or the same tokens in the URL fragment (#access_token=..). Staging and zpp usesevenmindstg://. - Custom scheme only. A universal link on
sevenmind.go.linkis never read as a login link. - All three tokens must be present. Tokens the backend accepts sign the user in and open Home; rejected tokens leave the user signed out on the login screen.
- A
/loginlink without a full token set signs nobody in: it opens Home with a session and the login screen without one. - A login link that arrives during splash is held until the app is ready, then handled before any other queued link, because it is what lets those links past the auth guard.
- Tokens are masked before a link is logged (
MagicLoginLink.redact) and never reachflutter_modular.
The Aury webview alias gotcha
lib/app/app_module.dart:238-242 registers /courseDetail (singular) as an alias of /courseDetails (plural). The Aury webview emits deep links with the singular spelling. Both routes resolve to CourseDetailModule. Removing the alias breaks Aury course launches.
Reference fix commit: bf75eb2ce. The pattern is intentional, not a duplicate.
Auth on deep links
Most deep-link targets are wrapped by AuthGuard(). Unauthenticated users who tap a deep link are redirected to the splash and auth flow; the original deep-link target is then handled after sign-in completes.
What agents should know
- Do not change or “fix” the
sevenmindstgscheme used by bothstagingandzpp. Tooling and Adjust campaigns rely on the existing values. - Shortlink resolution in Dart is iOS-only. On Android the app only reports the link to Adjust (
Adjust.processDeeplinkinMainActivity); it does not resolve shortlinks in-app. - A magic login link is a live session in plain text. Never log a raw incoming link; use
MagicLoginLink.redact. - When adding a new route that should be deep-linkable, register it in
lib/app/app_module.dartand confirm the auth-guard behavior matches the rest of the table. - The
/courseDetailalias must stay until the Aury team can update its webview to use the plural form. See aury-companion. - Deep-link parameters arriving on a cold start may race with the splash; rely on the in-app queue in
deep_link_handler.dartrather than reading the URI in your own widget’sinitState.
Related
- 7mind-mobile-apps-monorepo — the repo this lives in
- aury-companion — the reason the
/courseDetailalias exists - mobile-analytics-stack — Adjust is shared with attribution
- gymondo-sso-auth — the tokens a magic login link carries