콘텐츠로 건너뛰기

Auth0

이 콘텐츠는 아직 귀하의 언어로 제공되지 않습니다.

@capgo/capacitor-social-login supports Auth0 in two ways:

  • SocialLoginAuthConnect with the auth0 preset
  • Direct oauth2 configuration if you want full control over endpoints
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',
});
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',
},
});