내용으로 건너뛰기

Keycloak

GitHub

Keycloak는 OIDC 발견을 통해 내장된 공급자와 함께 가장 잘 작동합니다. oauth2 __CAPGO_KEEP_0__ issuerUrl.

OIDC discovery 예시

OIDC discovery 예시 섹션
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',
},
},
});

Keycloak에서 계속

Keycloak에서 계속 섹션

If you are using __CAPGO_KEEP_0__/__CAPGO_KEEP_1__ for authentication and account management, connect it with __CAPGO_KEEP_0__/__CAPGO_KEEP_1__. Keycloak __CAPGO_KEEP_0__/__CAPGO_KEEP_1__ for the native capability in capgo/capacitor, capgo/capacitor for the implementation detail in capgo/capacitor, capgo/capacitor for the implementation detail in capgo/capacitor, capgo/capacitor for the implementation detail in capgo/capacitor, and capgo/capacitor Two-factor authentication 두 단계 인증 구현 세부 사항에 대한.