mirror of
https://github.com/logto-io/logto.git
synced 2025-02-03 21:48:55 -05:00
98f808320b
* feat(core,connectors): add logoDark to connector metadata * feat(connectors): update Aliyun logo and add logoDark for Apple, Github
37 lines
1.3 KiB
TypeScript
37 lines
1.3 KiB
TypeScript
import path from 'path';
|
|
|
|
import { ConnectorMetadata, ConnectorType, ConnectorPlatform } from '@logto/connector-types';
|
|
import { getFileContents } from '@logto/shared';
|
|
|
|
export const authorizationEndpoint = 'https://github.com/login/oauth/authorize';
|
|
export const scope = 'read:user';
|
|
export const accessTokenEndpoint = 'https://github.com/login/oauth/access_token';
|
|
export const userInfoEndpoint = 'https://api.github.com/user';
|
|
|
|
// eslint-disable-next-line unicorn/prefer-module
|
|
const currentPath = __dirname;
|
|
const pathToReadmeFile = path.join(currentPath, '..', 'README.md');
|
|
const pathToConfigTemplate = path.join(currentPath, '..', 'docs', 'config-template.json');
|
|
const readmeContentFallback = 'Please check README.md file directory.';
|
|
const configTemplateFallback = 'Please check config-template.json file directory.';
|
|
|
|
export const defaultMetadata: ConnectorMetadata = {
|
|
id: 'github-universal',
|
|
target: 'github',
|
|
type: ConnectorType.Social,
|
|
platform: ConnectorPlatform.Universal,
|
|
name: {
|
|
en: 'GitHub',
|
|
'zh-CN': 'GitHub',
|
|
},
|
|
logo: './logo.svg',
|
|
logoDark: './logo-dark.svg',
|
|
description: {
|
|
en: 'Sign In with GitHub',
|
|
'zh-CN': 'GitHub登录',
|
|
},
|
|
readme: getFileContents(pathToReadmeFile, readmeContentFallback),
|
|
configTemplate: getFileContents(pathToConfigTemplate, configTemplateFallback),
|
|
};
|
|
|
|
export const defaultTimeout = 5000;
|