2022-05-12 12:17:17 +08:00
|
|
|
import { ConnectorMetadata, ConnectorType, ConnectorPlatform } from '@logto/connector-types';
|
2022-04-27 12:48:42 +08:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Note: If you do not include a version number we will default to the oldest available version, so it's recommended to include the version number in your requests.
|
|
|
|
* https://developers.facebook.com/docs/graph-api/overview#versions
|
|
|
|
*/
|
|
|
|
export const authorizationEndpoint = 'https://www.facebook.com/v13.0/dialog/oauth';
|
|
|
|
export const accessTokenEndpoint = 'https://graph.facebook.com/v13.0/oauth/access_token';
|
|
|
|
/**
|
|
|
|
* Note: The /me node is a special endpoint that translates to the object ID of the person or Page whose access token is currently being used to make the API calls.
|
|
|
|
* https://developers.facebook.com/docs/graph-api/overview#me
|
|
|
|
* https://developers.facebook.com/docs/graph-api/reference/user#Reading
|
|
|
|
*/
|
|
|
|
export const userInfoEndpoint = 'https://graph.facebook.com/v13.0/me';
|
|
|
|
export const scope = 'email,public_profile';
|
|
|
|
|
|
|
|
export const defaultMetadata: ConnectorMetadata = {
|
2022-05-24 11:39:44 +08:00
|
|
|
id: 'facebook-universal',
|
2022-05-12 12:17:17 +08:00
|
|
|
target: 'facebook',
|
2022-04-27 12:48:42 +08:00
|
|
|
type: ConnectorType.Social,
|
2022-05-23 17:54:05 +08:00
|
|
|
platform: ConnectorPlatform.Universal,
|
2022-04-27 12:48:42 +08:00
|
|
|
name: {
|
2022-05-19 17:31:32 +08:00
|
|
|
en: 'Facebook',
|
|
|
|
'zh-CN': 'Facebook',
|
2022-04-27 12:48:42 +08:00
|
|
|
},
|
2022-05-24 13:54:37 +08:00
|
|
|
logo: './logo.svg',
|
2022-06-23 11:12:29 +08:00
|
|
|
logoDark: null,
|
2022-04-27 12:48:42 +08:00
|
|
|
description: {
|
2022-06-24 10:08:53 +08:00
|
|
|
en: 'Provide users with the option to sign in with their Facebook account.',
|
|
|
|
'zh-CN': '为用户提供 Facebook 账号登录的选项。',
|
2022-04-27 12:48:42 +08:00
|
|
|
},
|
2022-06-27 10:00:37 +08:00
|
|
|
readme: './README.md',
|
|
|
|
configTemplate: './docs/config-template.json',
|
2022-04-27 12:48:42 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
export const defaultTimeout = 5000;
|