Skip to content

povio/PovioKitAuthFacebook

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PovioKit

Welcome to PovioKitAuthFacebook.
An auth provider for social login with Facebook.

Installation

Swift Package Manager

  • In Xcode, click File -> Add Packages...
  • Insert https://github.com/poviolabs/PovioKitAuthFacebook in 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.

Setup

Please read official documentation from Facebook for all the details around the setup and integration.

Usage

// 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 UIApplicationDelegate

License

PovioKitAuthFacebook is available under the MIT license. See the LICENSE file for more info.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages