Skip to content

SwiftfulThinking/SwiftfulAuthenticatingFirebase

Repository files navigation

SwiftfulAuthenticatingFirebase

Add Firebase Auth support to a Swift application through the SwiftfulAuthenticating framework.

Setup

Details (Click to expand)

Add SwiftfulAuthenticatingFirebase to your project.

https://github.com/SwiftfulThinking/SwiftfulAuthenticatingFirebase.git

Import the package.

import SwiftfulAuthenticatingFirebase

Configure AuthManager with FirebaseAuthService:

#if DEBUG
let authManager = AuthManager(service: MockAuthService(user: nil), logger: logManager)
#else
let authManager = AuthManager(service: FirebaseAuthService(), logger: logManager)
#endif

Example Actions

let uid = authManager.auth?.uid
let uid = try authManager.getAuthId()
try await authManager.signInAnonymously()
try await authManager.signInApple()
try await authManager.signInGoogle(GIDClientID: clientId)
try authManager.signOut()
try await authManager.deleteAccount()

Sign In With Apple

Details (Click to expand)

Firebase docs: https://firebase.google.com/docs/auth/ios/apple

1. Enable Apple as a Sign-In Method in Firebase Authentication console

  • Firebase Console -> Authentication -> Sign-in method -> Add new provider

2. Follow remaining steps on parent repo docs

Parent repo: https://github.com/SwiftfulThinking/SwiftfulAuthenticating

Sign In With Google

Details (Click to expand)

Firebase docs: https://firebase.google.com/docs/auth/ios/google-signin

1. Enable Google as a Sign-In Method in Firebase Authentication console

  • Firebase Console -> Authentication -> Sign-in method -> Add new provider

2. Follow remaining steps on parent repo docs

Parent repo: https://github.com/SwiftfulThinking/SwiftfulAuthenticating

Claude Code

This package is used via SwiftfulAuthenticating. See the parent package's .claude/swiftful-authenticating-rules.md for usage guidelines and integration advice for projects using Claude Code.

Platform Support

  • iOS 17.0+
  • macOS 14.0+

License

SwiftfulAuthenticatingFirebase is available under the MIT license.

About

Firebase Authentication for SwiftfulAuthenticating

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages