-
-
Notifications
You must be signed in to change notification settings - Fork 148
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
base: main
Are you sure you want to change the base?
Conversation
0881afd
to
9bfcfb0
Compare
9bfcfb0
to
1c63ef6
Compare
There was a problem hiding this 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 andAuthView
. - 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 ofApplicationDelegate.shared.application(...)
or explicitly returntrue
.
ApplicationDelegate.shared.application(
let logger = Logger(subsystem: "com.supabase.examples", category: "SignInWithFacebook") | ||
|
||
struct SignInWithFacebook: View { |
There was a problem hiding this comment.
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.
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.
Pull Request Test Coverage Report for Build 15531908710Details
💛 - Coveralls |
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.