메뉴로 바로가기

GitHub

개요

개요

GitHub is supported through the built-in generic oauth2 예시

클립보드에 복사

관련 문서
import { SocialLogin } from '@capgo/capacitor-social-login';
await SocialLogin.initialize({
oauth2: {
github: {
appId: 'your-github-client-id',
authorizationBaseUrl: 'https://github.com/login/oauth/authorize',
accessTokenEndpoint: 'https://github.com/login/oauth/access_token',
redirectUrl: 'myapp://oauth/github',
scope: 'read:user user:email',
pkceEnabled: true,
resourceUrl: 'https://api.github.com/user',
},
},
});
const result = await SocialLogin.login({
provider: 'oauth2',
options: {
providerId: 'github',
},
});
console.log(result.result.accessToken?.token);
console.log(result.result.resourceData);
설명

GitHub에서 계속하세요

GitHub에서 계속하세요

__CAPGO_KEEP_0__을 사용 중이라면 GitHub 인증 및 계정 흐름을 계획하고 연결하세요 @capgo/capacitor-social-login @capgo/capacitor-social-login @capgo/capacitor-social-login @capgo/capacitor-passkey @capgo/capacitor-passkey @capgo/capacitor-passkey @capgo/capacitor-native-생체인식 for the implementation detail in @capgo/capacitor-native-생체인식, and 두 단계 인증 for the implementation detail in 두 단계 인증.