Zu Inhalt springen

Keycloak

Keycloak funktioniert am besten über den integrierten oauth2 Anbieter mit OIDC-Entdeckung via issuerUrl.

import { SocialLogin } from '@capgo/capacitor-social-login';
await SocialLogin.initialize({
oauth2: {
keycloak: {
issuerUrl: 'https://sso.example.com/realms/mobile',
clientId: 'mobile-app',
redirectUrl: 'myapp://oauth/keycloak',
scope: 'openid profile email offline_access',
pkceEnabled: true,
},
},
});
const result = await SocialLogin.login({
provider: 'oauth2',
options: {
providerId: 'keycloak',
},
});
await SocialLogin.initialize({
oauth2: {
keycloak: {
appId: 'mobile-app',
authorizationBaseUrl: 'https://sso.example.com/realms/mobile/protocol/openid-connect/auth',
accessTokenEndpoint: 'https://sso.example.com/realms/mobile/protocol/openid-connect/token',
redirectUrl: 'myapp://oauth/keycloak',
scope: 'openid profile email offline_access',
pkceEnabled: true,
resourceUrl: 'https://sso.example.com/realms/mobile/protocol/openid-connect/userinfo',
logoutUrl: 'https://sso.example.com/realms/mobile/protocol/openid-connect/logout',
},
},
});
Bezogene Dokumente

Weitermachen mit Keycloak

Weitermachen mit Keycloak

Wenn Sie Authentifizierung und Kontoflows planen und durchführen möchten, Keycloak 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-biometric für die Implementierungsdetails in @capgo/capacitor-native-biometric und Zwei-Faktor-Authentifizierung für die Implementierungsdetails in Zwei-Faktor-Authentifizierung.