Social Logins work as an extension to Magic SDK. To add Social Login to your Magic integration, follow these steps to install the OAuth Extension:
- In your Podfile, add following lines.
Create your Magic SDK instance in your AppDelegate.swift
- Start the OAuth 2.0 login flow:
|loginWithPopup( _ configuration: OAuthConfiguration, response: (_ resp: Response<OAuthRepsonse>) |
|loginWithPopup(_ configuration: OAuthConfiguration) -> Promise <OAuthRepsonse>|
userInfo contains the OpenID Connect profile information about the user. The schema of this object should match the OpenID spec, except
that fields are
camelCased instead of
snake_cased. The presence of some fields may differ depending on the specific OAuth provider and the user's own privacy settings.
OAuthConfiguration(provider: OAuthProvider, redirectURI: String, scope: [String]? = nil, loginHint: String? = nil)
provider: .GOOGLE, .GITHUB, .FACEBOOK, or .APPLE
scope: This field specifies a space-delimited list of access scopes that correspond to the resources that your application could access on the user's behalf