Zum Inhalt springen

Microsoft Entra ID

GitHub

Microsoft Entra ID wird unterstützt durch:

  • Der azure Auth Connect-Voreinstellung
  • Direkt oauth2 Konfiguration gegen Microsoft-Identitätsendpunkte

Auth Connect-Voreinstellungsbeispiel

Beispiel für die Auth-Connect-Voreinstellung
import { SocialLoginAuthConnect } from '@capgo/capacitor-social-login';
await SocialLoginAuthConnect.initialize({
authConnect: {
azure: {
tenantId: 'common',
clientId: 'your-azure-client-id',
redirectUrl: 'myapp://oauth/azure',
},
},
});
const result = await SocialLoginAuthConnect.login({
provider: 'azure',
});

Direktes OAuth2-Beispiel

Auth Connect-Voreinstellungsbeispiel
import { SocialLogin } from '@capgo/capacitor-social-login';
await SocialLogin.initialize({
oauth2: {
azure: {
appId: 'your-azure-client-id',
authorizationBaseUrl: 'https://login.microsoftonline.com/common/oauth2/v2.0/authorize',
accessTokenEndpoint: 'https://login.microsoftonline.com/common/oauth2/v2.0/token',
redirectUrl: 'myapp://oauth/azure',
scope: 'openid profile email User.Read',
pkceEnabled: true,
resourceUrl: 'https://graph.microsoft.com/v1.0/me',
},
},
});
const result = await SocialLogin.login({
provider: 'oauth2',
options: {
providerId: 'azure',
},
});
  • Ersetzen common mit Ihrer Tenant-ID für Single-Tenant-Anwendungen.
  • resourceUrl kann auf Microsoft Graph zeigen, wenn Sie Profildaten sofort nach der Anmeldung erhalten möchten.
Abschnitt: Zugehörige Dokumentation

Wenn Sie Azure verwenden Microsoft Entra ID um die Authentifizierung und die Kontoflows zu planen, verbinden Sie es mit Verwenden Sie @capgo/capacitor-social-login für die native Fähigkeit in Verwenden Sie @capgo/capacitor-social-login Verwenden Sie @capgo/capacitor-social-login für die Implementierungsdetails in Verwenden Sie @capgo/capacitor-social-login Verwenden Sie @capgo/capacitor-passkey für die Implementierungsdetails in Verwenden Sie @capgo/capacitor-passkey Verwenden Sie @capgo/capacitor-native-biometric für die Implementierungsdetails in Verwenden Sie @capgo/capacitor-native-biometric und Zweifaktor-Authentifizierung für die Implementierungsdetails in Zweifaktor-Authentifizierung.