Zum Inhalt springen

Microsoft Entra ID

Microsoft Entra ID wird über folgende Möglichkeiten unterstützt:

  • Die azure Auth Connect-Voreinstellung
  • Direkte oauth2 Konfiguration gegen Microsoft-Identitätsendpunkte

Beispiel für die Auth Connect-Voreinstellung

Abschnitt mit dem Titel “Auth Connect-Voreinstellung Beispiel”
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',
});
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 Ersetzen Sie mit Ihrer Tenant-ID für Single-Tenant-Anwendungen.
  • resourceUrl Kann auf Microsoft Graph verweisen, wenn Sie Profile-Daten sofort nach der Anmeldung benötigen.

Wenn Sie Ionic Auth Connect verwenden Microsoft Entra ID 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 Mit @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-biometrische für die Implementierungsdetails in @capgo/capacitor-native-biometrische, und Zwei-Faktor-Authentifizierung für die Implementierungsdetails in Zwei-Faktor-Authentifizierung.