providerCreator
providerCreator
is a protocol that defines specific social login providers (e.g., Google, Facebook, Apple) available in our iOS SDK.
These specific providers use native calls or external libraries to authenticate users.
All providers except Apple that you configure in the ReachFive Console for which you don’t use a specific provider creator will authenticate through an ASWebAuthenticationSession
.
You should define and configure these providers when you configure the iOS SDK.
Examples
static let reachfive: ReachFive = ReachFive(
sdkConfig: sdkRemote,
providersCreators: [
GoogleProvider(),
FacebookProvider(),
AppleProvider(variant: "ios_native"),
WeChat()]
)
Available provider creators
The providers who have a variant parameter have the following algorithm to choose a variant configured on the console.
-
If a variant is provided, the variant with the exact name, irrespective of case, is chosen. If no variant matches, the algorithm chooses the variant as if no variant was provided.
-
If no variant is provided, the first variant containing
ios
in its name, irrespective of case, if any, is chosen. Otherwise, the default variant is chosen.
Name | Description | ||||
---|---|---|---|---|---|
The object for configuring Google native provider for our iOS SDK. Optionally takes a variant parameter.
|
|||||
The object for configuring Facebook native provider for our iOS SDK. This provider takes two optional parameters:
|
|||||
Optionally takes a variant parameter.
|
|||||
The object for configuring WeChat Connect for our iOS SDK.
|