Skip to content

feat(mobile): register native identity apps on hosted identity - #2076

Draft
nunoo wants to merge 6 commits into
feat/mobile-foundation-integrationfrom
feat/mobile-hosted-identity
Draft

nunoo wants to merge 6 commits into
feat/mobile-foundation-integrationfrom
feat/mobile-hosted-identity

Conversation

@nunoo

@nunoo nunoo commented Nov 11, 2026

Copy link
Copy Markdown
Contributor

Stacked on #1887 (mobile foundation integration). It stays a draft and folds into #1887. It does not merge into main on its own.

What it does

Hosted identity (staging and prod) can now register native (mobile) sign-in clients. Before this change, forge refused them.

  • Capability gate: shape-identity-native-app is now in BundleDocFeatures().
    • A control plane that predates it advertises its own forge's list, which lacks the feature, so LimitShape withholds native apps from it and prints a notice.
    • It is never sent something it would mis-register; an old control plane would map an unknown kind to a confidential web app.
    • Tests cover readers with no features, every feature except this one, and a nil list.
  • Hosted refusal lifted: NativeAppNotOnHostedMessage and the KCL refusal are gone. Hosted identity requires resolved redirect and logout URIs and refuses http.
  • Callbacks derived from app.json when the shape is built (env shape, build, deploy). Owner decision: forge derives them, and the control plane derives nothing.
    • Declared redirect_uris win and keep their order. Omitted logout_uris become …/signedout beside each redirect.
    • With no usable scheme, the app is dropped with a warning.
    • The https (universal-link) seam is hostedNativeRedirects.
  • KCL: native apps are derived for rn frontends on any identity runtime. native_sign_in = False opts out.
  • forge cloud identity status: reads the native app's outputs from GetIdentityStatus (kind, redirect_uris, post_logout_uris, scopes). Every read is behind an absent-field check, so an old control plane is fine.
  • Docs: the deploy/managed-identity/mobile skill, the managed-identity skill, the v1.4.0/native-auth playbook and the proposals.

Shape sent for a hosted native app:

{"name":"prod:mobile","workload":"","kind":"native","frontend":"mobile",
 "redirect_uris":["com.acme.mobile:/oauthredirect"],"logout_uris":["com.acme.mobile:/signedout"]}

Counterpart

A control-plane draft PR (linked once open) maps kind = "native" to a public PKCE app and adds the store kind, the frontend column and the GetIdentityStatus fields. It also adds a guard test, so a forge bump can never make the control plane advertise a feature it doesn't implement.

Validation

  • go build, go vet and gofmt are clean. apigate reports 19 compatible changes.
  • Scoped task test:short passes.
  • The full-mode KCL corpus passes.
  • The real-Zitadel dev tests pass.
  • golangci-lint was not run locally (the local toolchain doesn't match); CI lints it.

Not done

  • Injecting the client id into a release build (F1).
  • An end-to-end hosted run, which needs a deployed control plane carrying the counterpart PR.

…ed identity

Move shape-identity-native-app into BundleDocFeatures and drop the hosted
refusal in validateApplication: a hosted native app needs both redirect_uris
and logout_uris resolved, never http. LimitShape still withholds native apps
from a reader that lacks the feature, with the existing notice. The callback
derivation helpers move to pkg/release so devidentity and the hosted bundle
build share them.
The rn-frontend derivation no longer looks at the identity runtime, and
native_sign_in = False still opts out. Hosted keeps refusing http callbacks.
Fixtures flip from negative to positive for hosted native.
… build

forge env shape/build/deploy fill a hosted native app's redirect_uris and
logout_uris from expo.scheme (nativeAppSchemes); declared values win and an app
with no usable scheme is not sent, with a warning. forge cloud identity status
reads the native fields behind absent-field checks.
Respect existing same-package row and request factory functions, including
in-package tests, without treating prior generated output as ownership.
Reject other declaration conflicts explicitly before writing output.

Emit owner option helpers for failed owner-aware factories and omit the
unused ULID import for failure-only row factories. Preserve signatures and
schema failure diagnostics. Reproduce report a640ad4c with isolated schema
and handler fixtures plus generated-output type checks.
@reliant-labs

reliant-labs Bot commented Nov 14, 2026

Copy link
Copy Markdown
Contributor

This draft is 3 days old. Drafts are never reviewed: mark it ready for review when it is done (it then enters the review queue by itself), or close it.

Posted by Reliant for PR pipeline · pr-sweep · hourly, an automation of @reliant-01.

This branch has not been deployed

No deployments
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.

1 participant