Provider
Whenever you're dealing with a provider in your template, you're actually working with a Provider object.
Properties
Type: string
The name of the provider.
Type: string
The handle of the provider.
Type: bool
Whether the provider is enabled.
Type: string|null
The primary brand color of the provider.
Type: string|null
The SVG icon of the provider.
Type: bool
Whether the provider is enabled for login.
Type: bool
Whether the provider is enabled for control panel login.
Type: string
The handle of the field (from the provider API) to use when matching an existing Craft user.
Automatic first-time matching accepts email when the provider confirms that address, or id for the provider's stable account identifier. After the connection is created, Social Login uses the stored provider identifier rather than repeating profile-field matching.
Type: string
The handle of the field (in Craft) to use when matching an existing Craft user.
Provider ID matching is case-sensitive and exact. Verified email matching follows Craft's normal email comparison. Either match must resolve to one Craft user. If the provider cannot confirm an email, have the user sign in locally and connect the provider instead.
Type: array
A definition for how provider API fields should map to Craft user fields.
Type: array
A collection of options use in the Authorization URL.
Type: array
A collection of scopes use in the Authorization URL.
Type: array
A collection of custom fields to be included alongside default ones.
Methods
Returns the OAuth access token.
OAuth Provider
Most, if not all providers use the Auth (opens new window) plugin to handle the bulk of authentication work. As such, they inherit those classes.
Properties
The OAuth client ID.
The OAuth client secret.
Methods
The OAuth version (1 or 2).
Whether is OAuth 1.
Whether is OAuth 2.
Returns an array of config for the OAuth provider.
Returns the OAuth provider.
The array of options for the Authorization URL.
The Authorization URL used to redirect to the provider.
Fetches the access token from the provider upon callback.
Returns the result from an authenticated API request.