컨텐츠로 건너뛰기

Auth0

GitHub

@capgo/capacitor-social-login Auth0을 두 가지 방법으로 지원합니다.

  • SocialLoginAuthConnect Auth0과 함께 auth0 preset
  • 직접 oauth2 설정에 대한 완전한 제어를 원한다면 엔드포인트

인증 연결 preset 예시

인증 연결 preset 예시
import { SocialLoginAuthConnect } from '@capgo/capacitor-social-login';
await SocialLoginAuthConnect.initialize({
authConnect: {
auth0: {
domain: 'https://your-tenant.auth0.com',
clientId: 'your-auth0-client-id',
redirectUrl: 'myapp://oauth/auth0',
audience: 'https://your-api.example.com',
},
},
});
const result = await SocialLoginAuthConnect.login({
provider: 'auth0',
});

직접 OAuth2 예시

직접 OAuth2 예시
import { SocialLogin } from '@capgo/capacitor-social-login';
await SocialLogin.initialize({
oauth2: {
auth0: {
appId: 'your-auth0-client-id',
authorizationBaseUrl: 'https://your-tenant.auth0.com/authorize',
accessTokenEndpoint: 'https://your-tenant.auth0.com/oauth/token',
redirectUrl: 'myapp://oauth/auth0',
scope: 'openid profile email offline_access',
pkceEnabled: true,
additionalParameters: {
audience: 'https://your-api.example.com',
},
logoutUrl: 'https://your-tenant.auth0.com/v2/logout',
},
},
});
const result = await SocialLogin.login({
provider: 'oauth2',
options: {
providerId: 'auth0',
},
});
관련 문서

@__CAPGO_KEEP_0__/__CAPGO_KEEP_1__-social-login @__CAPGO_KEEP_0__/__CAPGO_KEEP_1__-social-login @__CAPGO_KEEP_0__/__CAPGO_KEEP_1__-social-login @capgo/capacitor-passkey @capgo/capacitor-social-login @capgo/capacitor-social-login @capgo/capacitor-social-login @capgo/capacitor-social-login @capgo/capacitor-passkey, @capgo/capacitor-native-biometric @capgo/capacitor-native-biometric, and 두 단계 인증 @__CAPGO_KEEP_0__/__CAPGO_KEEP_1__-native-biometric, and