Welcome to PovioKitAuthFacebook.
An auth provider for social login with Facebook.
- In Xcode, click
File->Add Packages... - Insert
https://github.com/poviolabs/PovioKitAuthFacebookin the Search field. - Select a desired
Dependency Rule. Usually "Up to Next Major Version" with "1.0.0". - Select "Add Package" button and check
PovioKitAuthFacebook. - Select "Add Package" again and you are done.
Please read official documentation from Facebook for all the details around the setup and integration.
// initialization
let authenticator = FacebookAuthenticator()
// signIn user with default permissions
let result = try await authenticator
.signIn(from: <view-controller-instance>)
// signIn user with custom permissions
let result = try await authenticator
.signIn(from: <view-controller-instance>, with: [<array-of-custom-permissions>])
// get authentication status
let state = authenticator.isAuthenticated
// signOut user
authenticator.signOut() // all provider data regarding the use auth is cleared at this point
// handle url
authenticator.canOpenUrl(_: application: options:) // call this from `application:openURL:options:` in UIApplicationDelegatePovioKitAuthFacebook is available under the MIT license. See the LICENSE file for more info.
