AWS Cognito
复制一个包含安装步骤和本插件的完整Markdown指南的设置命令。
通过支持Amazon Cognito cognito Auth Connect preset。您也可以手动配置它使用直接 OAuth2 端点。
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 为在使用 @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 中的实现细节 双因素身份验证 双因素身份验证的实现细节。