AWS Cognito
Copy a setup prompt with the install steps and the full markdown guide for this plugin.
Overview
Section titled “Overview”Amazon Cognito is supported through the cognito Auth Connect preset. You can also configure it manually with direct OAuth2 endpoints.
Auth Connect preset 示例
Auth Connect preset 示例import { SocialLoginAuthConnect } from '@capgo/capacitor-social-login';
await SocialLoginAuthConnect.initialize({ authConnect: { cognito: { domain: 'https://your-domain.auth.region.amazoncognito.com', clientId: 'your-cognito-client-id', redirectUrl: 'myapp://oauth/cognito', }, },});
const result = await SocialLoginAuthConnect.login({ provider: 'cognito',});直接 OAuth2 示例
直接 OAuth2 示例import { SocialLogin } from '@capgo/capacitor-social-login';
await SocialLogin.initialize({ oauth2: { cognito: { appId: 'your-cognito-client-id', authorizationBaseUrl: 'https://your-domain.auth.region.amazoncognito.com/oauth2/authorize', accessTokenEndpoint: 'https://your-domain.auth.region.amazoncognito.com/oauth2/token', redirectUrl: 'myapp://oauth/cognito', scope: 'openid profile email', pkceEnabled: true, resourceUrl: 'https://your-domain.auth.region.amazoncognito.com/oauth2/userInfo', logoutUrl: 'https://your-domain.auth.region.amazoncognito.com/logout', }, },});
const result = await SocialLogin.login({ provider: 'oauth2', options: { providerId: 'cognito', },});相关文档
相关文档从 AWS Cognito 继续
从 AWS Cognito 继续如果您正在使用 AWS Cognito 来规划身份验证和帐户流程,连接它与 使用@capgo/capacitor-social-login for the native capability in Using @capgo/capacitor-social-login, @capgo/capacitor-social-login 为@capgo/capacitor-social-login的实现细节 @capgo/capacitor-social-login 为@capgo/capacitor-social-login的实现细节 @capgo/capacitor-passkey 为@capgo/capacitor-passkey的实现细节 @__CAPGO_KEEP_0__/__CAPGO_KEEP_1__-passkey、@__CAPGO_KEEP_0__/__CAPGO_KEEP_1__-native-biometric、为@__CAPGO_KEEP_0__/__CAPGO_KEEP_1__-native-biometric的实现细节, 和 为了实现两因素身份验证的详细信息。