GitHub
Eine Setup-Anfrage mit den Installations-Schritten und der vollständigen Markdown-Anleitung für diesen Plugin kopieren.
Übersicht
Abschnitt mit dem Titel „Übersicht“GitHub wird durch den inbegriffenen allgemeinen Anbieter unterstützt. oauth2 Beispiel
Beispiel
Beispielimport { 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);Zugehörige Dokumentation
Zugehörige DokumentationWeitermachen von GitHub
Weitermachen von GitHubWenn Sie __CAPGO_KEEP_0__ verwenden GitHub um die Authentifizierung und die Kontenflüsse zu planen, verbinden Sie es mit Mit @capgo/capacitor-social-login für die native Fähigkeit in @capgo/capacitor-social-login, @capgo/capacitor-social-login für die Implementierungsdetails in @capgo/capacitor-social-login, @capgo/capacitor-passkey für die Implementierungsdetails in @capgo/capacitor-passkey, @capgo/capacitor-native-biometric für die Implementierungsdetails in @capgo/capacitor-native-biometric, und Zwei-Faktor-Authentifizierung für die Implementierungsdetails in Zwei-Faktor-Authentifizierung.