Skip to content

Instantly share code, notes, and snippets.

@adamcyber1
Created September 22, 2020 00:01
Show Gist options
  • Save adamcyber1/6064b9ce43ab73d09f08a1f76f0104e3 to your computer and use it in GitHub Desktop.
Save adamcyber1/6064b9ce43ab73d09f08a1f76f0104e3 to your computer and use it in GitHub Desktop.
Doogle Grive Sign Up
Future<String> _registerUser(LoginData data) async {
try {
Map<String, dynamic> userAttributes = {
"email": data.name,
};
SignUpResult res = await Amplify.Auth.signUp(
username: data.name,
password: data.password,
options: CognitoSignUpOptions(userAttributes: userAttributes));
_userName = data.name;
_isSignedUp = res.isSignUpComplete;
return null;
} on AuthError catch (e) {
print(e);
return "Register Error: " + e.toString();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment