Skip to content

Kotlin Client SDK: Update sign-into-mobile-app-redirect guide to the 2.x SDK#6221

Open
brentschaus-okta wants to merge 4 commits into
masterfrom
tbs-okta-1089674-update-configure-kotlin-redirect-auth
Open

Kotlin Client SDK: Update sign-into-mobile-app-redirect guide to the 2.x SDK#6221
brentschaus-okta wants to merge 4 commits into
masterfrom
tbs-okta-1089674-update-configure-kotlin-redirect-auth

Conversation

@brentschaus-okta

@brentschaus-okta brentschaus-okta commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Description:

  • What's changed?

1. Update the Android (Kotlin) guide to the 2.x SDK

Updates the Android (Kotlin) version of the "Sign into mobile app redirect" guide to the current okta-mobile-kotlin 2.x SDK (BOM 2.0.3). This is the Kotlin counterpart to the Swift refresh in #5953. The guide previously targeted the 1.x SDK (CredentialBootstrap, OidcClient, OidcClientResult), which was removed or renamed in 2.x and no longer compiles against today's SDK.

  • addconfigpkg: BOM 1.0.02.0.3; auth-foundation-bootstrapauth-foundation + oauth2 (kept web-authentication-ui).
  • configmid: discoveryUrl/DISCOVERY_URLissuer/ISSUER in the properties list, placeholder table, and buildConfigField block; dropped the /.well-known/openid-configuration suffix (2.x derives this automatically).
  • opensignin: SDK init now uses AuthFoundation.initializeAndroidContext(this) + OidcConfiguration.default; sign-in/sign-out use WebAuthentication(), OAuth2ClientResult, and Credential.store/setDefaultAsync/getDefaultAsync/delete. Sign-in state is now a null-check on the default credential (a Credential can no longer hold a null token in 2.x).
  • getuserinfo, usetoken: CredentialBootstrap.defaultCredential()Credential.getDefaultAsync().
  • samplecode: repointed to the SDK repo's own sample (okta-mobile-kotlin/tree/master/app), mirroring the Swift PR.
  • index (shared): fixed the to user anto use an title typo introduced in Swift Client SDK: Update "sign in to mobile - redirect" guide #5953 (also corrects the iOS page, since the title is shared).

Every code snippet was verified against the okta-mobile-kotlin@master sample app (SampleApplication.kt, BrowserViewModel.kt, DashboardViewModel.kt) and the Credential source.

2. Cross-link cleanup (related to the above)

  • Journeys: the mobile-redirect bullets in the OCI-mobile and OCI-secure-your-first-web-app journeys linked only to the iOS guide. Repointed them to the framework-neutral guide path so the updated Kotlin/Android version is surfaced too.
  • Stale anchor fix: keep-user-signed-in related links (android + ios) pointed to a #check-for-a-session-at-startup anchor that no longer exists in the redirect guide. Repointed to the standalone check-for-session guide, matching how the redirect guide now references it.

3. Inline naming StackSnippet

What's changed?

  • Names the platform SDK per framework in the Sign into a mobile app using the redirect model guide, so readers see their own platform's SDK named in the prose rather than a generic "Okta SDK."

  • Adds an inline sdkname StackSnippet that resolves to Okta Client SDK for Swift (iOS) / Okta Client SDK for Kotlin (Android).

  • Wires that snippet into the three generic SDK references in the shared main/index.md (Add packages, Define a callback route, Open the sign-in page).

  • Names the SDK explicitly in the per-framework dependency snippets (addconfigpkg.md): "Okta Mobile Kotlin library" → "Okta Client SDK for Kotlin"; "Okta OIDC package" → "Okta Client SDK for Swift package". This matches the dominant "Okta Client SDK for " phrasing already used across the docs, and mirrors the same change made to the sign-users-in-mobile-self-hosted guide.

  • Is this PR related to a Monolith release? No.

Resolves:

Netlify Preview Link:

Preview link

…x SDK

Rewrite the Android code samples, config, and dependencies for the
okta-mobile-kotlin 2.x SDK (BOM 2.0.3), the Kotlin twin of the Swift
refresh in #5953. The guide previously targeted the 1.x SDK
(CredentialBootstrap, OidcClient, OidcClientResult), which was removed
or renamed in 2.x and no longer compiles.

- addconfigpkg: BOM 1.0.0 -> 2.0.3; auth-foundation-bootstrap ->
  auth-foundation + oauth2
- configmid: discoveryUrl/DISCOVERY_URL -> issuer/ISSUER (drop
  .well-known/openid-configuration suffix)
- opensignin: AuthFoundation.initializeAndroidContext +
  OidcConfiguration.default; WebAuthentication(), OAuth2ClientResult,
  Credential.store/setDefaultAsync/getDefaultAsync/delete; null-check
  default credential for sign-in state
- getuserinfo, usetoken: CredentialBootstrap.defaultCredential() ->
  Credential.getDefaultAsync()
- samplecode: point to okta-mobile-kotlin/tree/master/app
- index: fix 'to user an' -> 'to use an' title typo from #5953

Verified every snippet against the okta-mobile-kotlin master sample app.
@okta-prod-github-app

This comment was marked as outdated.

…chor

Follow-on cross-link cleanup alongside the Kotlin guide update.

- OCI-mobile and OCI-secure-your-first-web-app journeys: the mobile
  redirect bullets pointed only at the iOS guide. Repoint to the
  framework-neutral guide path so the updated Kotlin/Android version is
  also surfaced.
- keep-user-signed-in related.md (android + ios): the 'Check for a
  session at startup' link pointed to a #check-for-a-session-at-startup
  anchor that no longer exists in the redirect guide. Repoint to the
  standalone check-for-session guide, matching how the guide now links
  it.
@okta-prod-github-app

This comment was marked as outdated.

@brentschaus-okta brentschaus-okta force-pushed the tbs-okta-1089674-update-configure-kotlin-redirect-auth branch from 97f87ba to 7b2df23 Compare June 11, 2026 04:42
@okta-prod-github-app

This comment was marked as outdated.

@okta-prod-github-app

This comment was marked as outdated.

Add an inline 'sdkname' StackSnippet (Okta Client SDK for Swift / for Kotlin)
and use it for the generic SDK references in the shared index, so readers see
their platform's SDK named in the prose. Also name the SDK explicitly in the
per-framework dependency snippets. Matches the dominant 'Okta Client SDK for
<lang>' phrasing already used across the docs.
@okta-prod-github-app

Copy link
Copy Markdown

Acrolinx score

A minimum Acrolinx Score of 80 is required. The total score is an average of the subscores.
Select Total score to review the Acrolinx scorecard for your article. Try to increase your individual scores, for example: Correctness. Your content will be clearer and more consistent.

Article Total score
Required:80
Word and phrases
(Brand, terms)
Preferred: 80
Correctness
(Spelling, grammar)
Preferred: 80
Clarity
(Readability)
Preferred: 80
Inclusive language
(+ accesibility)
Preferred: 80
packages/@okta/vuepress-site/docs/guides/keep-user-signed-in/main/android/related.md 84 100 7 100
packages/@okta/vuepress-site/docs/guides/keep-user-signed-in/main/ios/related.md 84 100 7 100
packages/@okta/vuepress-site/docs/guides/sign-into-mobile-app-redirect/index.md 100 100 100 100
packages/@okta/vuepress-site/docs/guides/sign-into-mobile-app-redirect/main/android/addconfigpkg.md 100 100 100 100
packages/@okta/vuepress-site/docs/guides/sign-into-mobile-app-redirect/main/android/configmid.md 89 100 79 100
packages/@okta/vuepress-site/docs/guides/sign-into-mobile-app-redirect/main/android/getuserinfo.md 100 100 100 100
packages/@okta/vuepress-site/docs/guides/sign-into-mobile-app-redirect/main/android/opensignin.md 100 100 100 100
packages/@okta/vuepress-site/docs/guides/sign-into-mobile-app-redirect/main/android/samplecode.md 85 100 14 100
packages/@okta/vuepress-site/docs/guides/sign-into-mobile-app-redirect/main/android/sdkname.md 100 100 100 100
packages/@okta/vuepress-site/docs/guides/sign-into-mobile-app-redirect/main/android/usetoken.md 100 100 100 100
packages/@okta/vuepress-site/docs/guides/sign-into-mobile-app-redirect/main/index.md 94 100 80 93
packages/@okta/vuepress-site/docs/guides/sign-into-mobile-app-redirect/main/ios/addconfigpkg.md 82 100 100 55
packages/@okta/vuepress-site/docs/guides/sign-into-mobile-app-redirect/main/ios/sdkname.md 100 100 100 100
packages/@okta/vuepress-site/docs/journeys/OCI-mobile/main/index.md 95 100 100 85
packages/@okta/vuepress-site/docs/journeys/OCI-secure-your-first-web-app/main/index.md 97 100 100 100

Successfully checked 15 of 15 documents.
See summary in Content Analysis Dashboard

Reopen the pull request or push new changes to check again.

Depending on the Acrolinx server configuration, the
links expire after some time and you must have a login for the
Acrolinx server to access them again.

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.

2 participants