Skip to content

docs(auth): correct the auth README against the current API - #2496

Merged
russellwheatley merged 6 commits into
version-10.0.0-beta05from
docs/auth-readme-corrections
Sep 8, 2026
Merged

docs(auth): correct the auth README against the current API#2496
russellwheatley merged 6 commits into
version-10.0.0-beta05from
docs/auth-readme-corrections

Conversation

@demolaf

@demolaf demolaf commented Sep 8, 2026

Copy link
Copy Markdown
Member

The auth README documented an API in several places that never existed. §AuthFlowController and §Low-Level API both showed val state = controller.start() returning an AuthState from a coroutine - the real start() takes an Activity and a request code, returns Unit, and is deprecated. Both now register an ActivityResultLauncher and launch controller.createIntent(this), matching AuthFlowControllerDemoActivity. state.result.user became state.user, since AuthState.Success.result is nullable and user is the field being reached for.

Smaller corrections in the same vein: MfaChallengeScreen was passing a non-existent onChallengeComplete while omitting the required auth and onSuccess; ErrorRecoveryDialog was missing the required stringProvider; FirebaseAuthUI.create was missing the required app; two providers = listOf(...) assignments became the providers { } block, whose setter is private; and context is now set in all 40 authUIConfiguration {} examples - the builder requires it and throws without it, and only 3 set it.

isCredentialLinkingEnabled, passwordResetActionCodeSettings and legacyFetchSignInWithEmail are all read by the library but were documented nowhere, so they are now in the configuration reference. Minimum requirements said SDK 21 and Kotlin 1.9 against minSdk = 23 and Kotlin 2.4, and the version checklist and Compose BOM were stale.

§Migration Guide is replaced by a link to docs/upgrade-to-10.0.md. It restated that file's own key-changes list and checklist, the two had drifted apart, and the OKF documentation policy asks for one owning doc per topic.

§Screen Transitions is #2475 absorbed into this PR rather than rewritten here - its two commits are cherry-picked with authorship intact, so the samples are the ones already compiled verbatim against the module. #2475 is closed in favour of this one. The only addition is the context line, for consistency with the rest of the file.


Maintainer note: Fixes internal CPRN-404
Maintainer note: Refs internal CPRN-427

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the auth/README.md documentation to reflect new minimum requirements (Android SDK 23+, Kotlin 2.0+), API changes requiring an application context in authUIConfiguration, and updated transition animations using togetherWith. The review feedback correctly identifies several issues in the updated Compose code snippets, such as the unavailability of applicationContext inside standalone Composable functions, the incorrect usage of LocalContext.current inside non-composable lambdas, and the need to clarify that registerForActivityResult must be called during initialization.

Comment thread auth/README.md
Comment thread auth/README.md Outdated
Comment thread auth/README.md Outdated
Comment thread auth/README.md Outdated

@russellwheatley russellwheatley left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. The fake controller.start() return value is gone, and the migration section now points at the upgrade guide instead of drifting from it.

@russellwheatley
russellwheatley merged commit 9630281 into version-10.0.0-beta05 Sep 8, 2026
9 checks passed
@russellwheatley
russellwheatley deleted the docs/auth-readme-corrections branch September 8, 2026 15:31
@github-project-automation github-project-automation Bot moved this from Backlog to Done in studio-2394994192-60a69 Sep 8, 2026
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.

3 participants