Closed sisygoboom closed 1 day ago
Hello @sisygoboom. Can you share your Amplify Configuration? You can remove any sensitive or app specific information.
Auth construct:
import { defineAuth, secret } from '@aws-amplify/backend';
/**
* Define and configure your auth resource
* @see https://docs.amplify.aws/gen2/build-a-backend/auth
*/
export const auth = defineAuth({
loginWith: {
phone: true,
externalProviders: {
facebook: {
clientId: secret('FACEBOOK_APP_ID'),
clientSecret: secret('FACEBOOK_APP_SECRET'),
scopes: ['email', 'public_profile'],
},
google: {
clientId: secret('GOOGLE_CLIENT_ID'),
clientSecret: secret('GOOGLE_CLIENT_SECRET'),
scopes: ['email', 'profile'],
},
callbackUrls: ['paritae://callback'], // Ensure these match your actual callback URLs
logoutUrls: ['paritae://logout'], // Ensure these match your actual logout URLs
},
},
userAttributes: {
email: {
required: true,
mutable: true
},
phoneNumber: {
required: false,
mutable: true
},
profilePicture: {
required: false,
mutable: true,
}
}
});
amplify config:
const amplifyConfig = '''{
"UserAgent": "@aws-amplify/client-config/1.0.2",
"Version": "1.0",
"auth": {
"plugins": {
"awsCognitoAuthPlugin": {
"UserAgent": "@aws-amplify/client-config/1.0.2",
"Version": "1.0",
"CognitoUserPool": {
"Default": {
"PoolId": "REDACTED",
"AppClientId": "REDACTED",
"Region": "REDACTED"
}
},
"CredentialsProvider": {
"CognitoIdentity": {
"Default": {
"PoolId": "REDACTED",
"Region": "REDACTED"
}
}
},
"Auth": {
"Default": {
"authenticationFlowType": "USER_SRP_AUTH",
"passwordProtectionSettings": {
"passwordPolicyMinLength": 8,
"passwordPolicyCharacters": [
"REQUIRES_NUMBERS",
"REQUIRES_LOWERCASE",
"REQUIRES_UPPERCASE",
"REQUIRES_SYMBOLS"
]
},
"signupAttributes": [
"EMAIL"
],
"usernameAttributes": [
"PHONE_NUMBER"
],
"verificationMechanisms": [
"PHONE_NUMBER"
]
}
},
"AppSync": {
"Default": {
"ApiUrl": "REDACTED",
"Region": "REDACTED",
"AuthMode": "REDACTED",
"ClientDatabasePrefix": "REDACTED"
},
"data_AMAZON_COGNITO_USER_POOLS": {
"ApiUrl": "REDACTED",
"Region": "REDACTED",
"AuthMode": "REDACTED",
"ClientDatabasePrefix": "REDACTED"
}
}
}
}
},
"api": {
"plugins": {
"awsAPIPlugin": {
"data": {
"endpointType": "GraphQL",
"endpoint": "REDACTED",
"region": "REDACTED",
"authorizationType": "REDACTED"
}
}
}
}
}''';
Command used:
npx ampx sandbox --outputs-format dart --outputs-out-dir lib --outputs-version 0
@sisygoboom Thank you. It looks like the issue is that the oAuth info isn't added to your config. We have an issue open for this already: https://github.com/aws-amplify/amplify-backend/issues/1551
I am going to keep this issue open because Amplify Flutter should throw a better error message in this scenario.
This was resolved in version 2.2.0. If you are still facing issue after upgrading please let us know. Thanks.
Description
Full error:
iOS error:
Android error:
Categories
Steps to Reproduce
Screenshots
No response
Platforms
Flutter Version
3.22.0 & 3.19.6
Amplify Flutter Version
2.0.0
Deployment Method
AWS CDK
Schema
No response