Skip to content

chore: add Facebook Auth example #729

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft

Conversation

grdsdev
Copy link
Collaborator

@grdsdev grdsdev commented Jun 9, 2025

What kind of change does this PR introduce?

Bug fix, feature, docs update, ...

What is the current behavior?

Please link any relevant issues here.

What is the new behavior?

Feel free to include screenshots if it includes visual changes.

Additional context

Add any other context or screenshots.

@grdsdev grdsdev force-pushed the guilherme/example-facebook branch from 0881afd to 9bfcfb0 Compare June 9, 2025 09:45
@grdsdev grdsdev force-pushed the guilherme/example-facebook branch from 9bfcfb0 to 1c63ef6 Compare June 9, 2025 09:48
@grdsdev grdsdev requested a review from Copilot June 9, 2025 09:53
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Adds a Facebook authentication example to the Supabase Swift SDK examples, including package dependency, example view, app delegate setup, and documentation.

  • Introduce facebook-ios-sdk in the Swift package resolution.
  • Create SignInWithFacebook view and wire it into the app lifecycle and AuthView.
  • Update Info.plist and README with Facebook App ID, client token, and URL scheme placeholders.

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
Supabase.xcworkspace/xcshareddata/swiftpm/Package.resolved Added facebook-ios-sdk dependency
Examples/README.md Documented Facebook Sign-In setup
Examples/Examples/Info.plist Added FacebookAppID, FacebookClientToken, URL schemes
Examples/Examples/ExamplesApp.swift Configured AppDelegate and SceneDelegate for Facebook Login
Examples/Examples/Auth/SignInWithFacebook.swift New SwiftUI view for Facebook sign-in example
Examples/Examples/Auth/AuthView.swift Integrated Facebook option into AuthView
Examples/Examples.xcodeproj/project.pbxproj Registered new source file and Swift package products
Comments suppressed due to low confidence (4)

Examples/Examples/Info.plist:20

  • [nitpick] Placeholder formatting includes spaces inside braces. Use a consistent placeholder name without spaces, e.g. {{DOT_REVERSED_IOS_CLIENT_ID}}, to avoid substitution errors.
<string>{{ DOT_REVERSED_IOS_CLIENT_ID }}</string>

Examples/Examples/Info.plist:26

  • Placeholder includes spaces and unusual naming. Consider using fb{{FACEBOOK_APP_ID}} to match typical placeholder conventions and ensure a valid URL scheme.
<string>fb{{ FACEBOOK APP ID }}</string>

Examples/README.md:13

  • Add a step to resolve Swift Package dependencies (e.g., via Xcode’s Swift Packages menu or swift package update) so the Facebook SDK is fetched before building.
3. Build and run the project (⌘R)

Examples/Examples/ExamplesApp.swift:19

  • Missing return statement in application(_:didFinishLaunchingWithOptions:). The method must return a Bool; either return the result of ApplicationDelegate.shared.application(...) or explicitly return true.
ApplicationDelegate.shared.application(

Comment on lines 6 to 8
let logger = Logger(subsystem: "com.supabase.examples", category: "SignInWithFacebook")

struct SignInWithFacebook: View {
Copy link
Preview

Copilot AI Jun 9, 2025

Choose a reason for hiding this comment

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

[nitpick] Scope the logger by declaring it as a private static property inside the SignInWithFacebook struct to avoid polluting the global namespace.

Suggested change
let logger = Logger(subsystem: "com.supabase.examples", category: "SignInWithFacebook")
struct SignInWithFacebook: View {
struct SignInWithFacebook: View {
private static let logger = Logger(subsystem: "com.supabase.examples", category: "SignInWithFacebook")

Copilot uses AI. Check for mistakes.

@coveralls
Copy link

coveralls commented Jun 9, 2025

Pull Request Test Coverage Report for Build 15531908710

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall first build on guilherme/example-facebook at 75.652%

Totals Coverage Status
Change from base Build 15390678797: 75.7%
Covered Lines: 5223
Relevant Lines: 6904

💛 - Coveralls

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