Skip to content

chore: improve package metadata and dart developers experience #184

Draft
IldySilva wants to merge 11 commits into
nhost:mainfrom
IldySilva:main
Draft

chore: improve package metadata and dart developers experience #184
IldySilva wants to merge 11 commits into
nhost:mainfrom
IldySilva:main

Conversation

@IldySilva

@IldySilva IldySilva commented Jun 6, 2026

Copy link
Copy Markdown
  • Fix package repository links so each pub.dev package points to its own source directory
  • Improve package descriptions to better explain each package’s purpose on pub.dev
  • Align README dependency snippets with the current package versions
  • Fix the nhost_dart README sample to use the current public APIs
  • Redact auth tokens from NhostAuthClient.toString()
  • Add a focused test to ensure auth tokens are not exposed in string output

Why

This improves package trust and developer experience on pub.dev. Users should land on the correct source directory, copy dependency snippets that install current versions, and avoid README examples that reference outdated APIs.

The token redaction change also prevents accidental leaking of access/refresh tokens through logs, debug prints, or crash reports , it just grab my attention when working with nhost

nhost_flutter (new package):

  • Nhost singleton with initialize()/instance/local()/reset() API
  • SecureAuthStore backed by flutter_secure_storage (encrypted on Android/iOS)
  • authStateChanges stream and authStateListenable (ValueListenable) on NhostAuthClient
  • Sealed AuthState hierarchy: AuthStateLoading, AuthStateSignedIn, AuthStateSignedOut
  • Widgets: NhostAuthGate, NhostAuthStateBuilder, NhostSignedIn, NhostSignedOut, NhostUserBuilder
  • Example app: sign-in, register, anonymous sign-in + account upgrade,
  • forgot password, change password — auth flows demonstrated
  • 36 unit tests covering singleton, sealed states, extensions, and widgets
  • fixes Is anonymous sign-in supported?  #70

nhost_auth_dart — bug fix (#180):

  • _loading now reset on non-401 refresh failure during bootstrap, preventing
    authenticationState from staying stuck at inProgress indefinitely

nhost_sdk / nhost_auth_dart — new auth API coverage:

  • signInWithPat(pat) — POST /signin/pat
  • fetchUser() — GET /user
  • verifyToken(accessToken) — POST /token/verify
  • WebAuthn interface + implementation: signInWithWebAuthn, verifyWebAuthnSignIn,
    signUpWithWebAuthn, verifyWebAuthnSignUp, addWebAuthnCredential,
    verifyAddWebAuthnCredential, elevateWithWebAuthn, verifyWebAuthnElevation

nhost_dart — export fixes:

  • Added User, AuthResponse, MultiFactorAuthResponse, DeanonymizeOptions,
    DeanonymizeSignInMethod to the public export list

@IldySilva IldySilva changed the title chore: improve package metadata and README install docs chore: improve package metadata and dart developers experience Jun 8, 2026
@IldySilva IldySilva marked this pull request as draft June 8, 2026 19:25
@IldySilva

Copy link
Copy Markdown
Author

Hey @dbarrosop just wanted to make sure this doesn't look like random noise in the repo.

I've been actively working on this SDK and studying the auth API reference, the open issues, and how other Flutter backends handle the same flows , trying to find where the DX can be meaningfully better.

I converted to draft intentionally because I know there are breaking changes mixed in with the improvements, and I'd rather get early alignment than land a big PR that goes in the wrong direction.

If you have a vision for where the SDK should go, constraints I should know about, or things you'd prioritize differently, I'd really appreciate hearing it.

@dbarrosop

Copy link
Copy Markdown
Member

Thanks for this draft, this is a huge PR though with a lot of unrelated changes, I would suggest breaking it down into individual components so we can review more effectively.

@IldySilva

Copy link
Copy Markdown
Author

I'll break it down into smaller PRs and tackle them one piece at a time.

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.

Is anonymous sign-in supported?

2 participants