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 example
Section titled “Auth Connect preset example”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',});Direct OAuth2 example
Section titled “Direct OAuth2 example”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', },});Related docs
Section titled “Related docs”Keep going from AWS Cognito
Section titled “Keep going from AWS Cognito”If you are using AWS Cognito to plan authentication and account flows, connect it with Using @capgo/capacitor-social-login for the native capability in Using @capgo/capacitor-social-login, @capgo/capacitor-social-login for the implementation detail in @capgo/capacitor-social-login, @capgo/capacitor-passkey for the implementation detail in @capgo/capacitor-passkey, @capgo/capacitor-native-biometric for the implementation detail in @capgo/capacitor-native-biometric, and Two-factor authentication for the implementation detail in Two-factor authentication.