Skip to content

feat(auth-firebase): Firebase auth flow library isolating @angular/fire (0.0.16) - #10

Merged
rdlabo merged 1 commit into
mainfrom
feat/auth-firebase-reauth
Jul 3, 2026
Merged

feat(auth-firebase): Firebase auth flow library isolating @angular/fire (0.0.16)#10
rdlabo merged 1 commit into
mainfrom
feat/auth-firebase-reauth

Conversation

@rdlabo

@rdlabo rdlabo commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

New secondary entry point @rdlabo/ionic-angular-kit/auth-firebase that isolates @angular/fire into a single DI provider, so apps import KIT_FIREBASE_AUTH and call kit functions instead of the SDK directly. This makes the eventual @angular/fire → modular firebase/auth swap provider-local.

Design

  • The kit performs no UI. Flow functions run the Firebase op only; loading, prompts and error alerts are app side effects.
  • Uniform hooks + no-throw contract. kitSignIn / kitSignUp / kitSignOut / kitSendPasswordReset / kitSendEmailVerification / kitUnlinkProvider take { before, success, error, finally } and resolve null (value) / false (boolean) on failure, handing the raw error to the error hook for the app to present from its own dictionary.
  • Mechanics-only helpers. kitReauthWithRetry owns just the re-auth + wrong-password-retry loop (app injects prompt / withLoading / mutate); kitResolveAuthStatus maps a user to 'user' | 'confirm' | 'required'. Plus kitAuthState / kitGetIdToken.
  • KIT_DEFAULT_AUTH_TEXT is an importable canonical error dictionary — the kit does not present it.
  • Social (.../auth-firebase/social, nested entry to isolate the Capacitor plugin peers): kitFacebookLogin / kitAppleLogin / kitFacebookLogout, same hook shape (success receives the identity payload for a backend call).

Isolation gate

Apps import KIT_FIREBASE_AUTH + these functions; @angular/fire is referenced only inside kit-firebase-provider.ts. Heavy peers (@angular/fire, firebase, Capacitor plugins) are optional peer deps kept off the primary entry.

Version 0.0.16.

@netlify

netlify Bot commented Jul 2, 2026

Copy link
Copy Markdown

Deploy Preview for rdlabo-ionic-angular-library ready!

Name Link
🔨 Latest commit 71b23fa
🔍 Latest deploy log https://app.netlify.com/projects/rdlabo-ionic-angular-library/deploys/6a475e90311cd500084ec528
😎 Deploy Preview https://deploy-preview-10--rdlabo-ionic-angular-library.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@devin-ai-integration devin-ai-integration 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.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Open in Devin Review

Add the `@rdlabo/ionic-angular-kit/auth-firebase` secondary entry point so
`@angular/fire` is touched in exactly one place — the DI provider — letting apps
import `KIT_FIREBASE_AUTH` and call kit functions instead of the SDK directly
(making the eventual @angular/fire -> firebase/auth swap provider-local).

The kit performs no UI. Flow functions (kitSignIn/kitSignUp/kitSignOut/
kitSendPasswordReset/kitSendEmailVerification/kitUnlinkProvider) take uniform
{ before, success, error, finally } hooks and resolve null/false on failure
instead of throwing, handing the raw error to the app to present. Mechanics-only
helpers kitReauthWithRetry (app injects prompt/withLoading/mutate) and
kitResolveAuthStatus cover re-auth and the 3-state status. KIT_DEFAULT_AUTH_TEXT
is an importable canonical error dictionary the app renders itself.

Social login (Facebook/Apple) lives in the nested entry point
`.../auth-firebase/social` to isolate the Capacitor plugin peers.

Version 0.0.16.
@rdlabo
rdlabo force-pushed the feat/auth-firebase-reauth branch from 11886f7 to 71b23fa Compare July 3, 2026 07:02
@rdlabo rdlabo changed the title feat(auth-firebase): re-auth-then-mutate helper + reauth prompt controller (0.0.16) feat(auth-firebase): Firebase auth flow library isolating @angular/fire (0.0.16) Jul 3, 2026
@rdlabo
rdlabo merged commit b38b2bc into main Jul 3, 2026
10 checks passed
@rdlabo

rdlabo commented Jul 3, 2026

Copy link
Copy Markdown
Contributor Author

/devin レビューして必要に応じて修正して

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