メインコンテンツにジャンプ

Auth0

GitHub

@capgo/capacitor-social-login Auth0を2つの方法でサポートしています:

  • SocialLoginAuthConnect presetを使用して、エンドポイントの完全な制御を得るには、Direct設定を使用してください。 auth0 Auth Connect presetの例
  • 「Auth Connect presetの例」 oauth2 コピー

Direct OAuth2の例

「Direct OAuth2の例」
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',
},
});

Auth0 を使用している場合 Auth0 認証とアカウントフローの計画に使用し、Auth0 を Native Capability の @capgo/capacitor-social-login を使用 Native Capability の @capgo/capacitor-social-login の実装詳細 @capgo/capacitor-social-login @capgo/capacitor-social-login の実装詳細 @capgo/capacitor-passkey 実装詳細については @capgo/capacitor-passkey を参照してください。 @capgo/capacitor-native-biometric 実装詳細については @capgo/capacitor-native-biometric を参照してください。 2要素認証 2要素認証の実装詳細についてはこちらを参照してください。