AWS Amplify - 成功注册后在 cognito 中存储用户 uuid 的正确方法是什么?
AWS Amplify - What is the correct way of storing a user's uuid in cognito after successfully signing up?
我正在使用 AWSMobileClient 注册新用户。在他们成功注册后,我想将他们唯一的 uuid aka "sub" id 存储在我的 SQL 数据库中。
AWSMobileClient.getInstance().signUp(username, password, attributes, null, new
Callback<SignUpResult>() {
@Override
public void onResult(final SignUpResult signUpResult) {
runOnUiThread(new Runnable() {
@Override
public void run() {
//Successful signing up a new user
//What would I do here?
}
});
}
@Override
public void onError(Exception e) {
Log.e(TAG, "Sign-up error", e);
}
用户注册成功,我会在回调方法中向我的数据库发出post请求吗?如果用户的网络在通话中出现故障或发生其他情况并且 post 请求未成功记录用户的 uuid,会发生什么情况。这样做的正确方法是什么?
Cognito 有一个 post 确认触发器。您可以使用该触发器调用更新数据库的 lambda 函数。由于这一切都发生在 AWS 内,因此网络故障的可能性较小。
可以找到有关流的更多信息here
我正在使用 AWSMobileClient 注册新用户。在他们成功注册后,我想将他们唯一的 uuid aka "sub" id 存储在我的 SQL 数据库中。
AWSMobileClient.getInstance().signUp(username, password, attributes, null, new
Callback<SignUpResult>() {
@Override
public void onResult(final SignUpResult signUpResult) {
runOnUiThread(new Runnable() {
@Override
public void run() {
//Successful signing up a new user
//What would I do here?
}
});
}
@Override
public void onError(Exception e) {
Log.e(TAG, "Sign-up error", e);
}
用户注册成功,我会在回调方法中向我的数据库发出post请求吗?如果用户的网络在通话中出现故障或发生其他情况并且 post 请求未成功记录用户的 uuid,会发生什么情况。这样做的正确方法是什么?
Cognito 有一个 post 确认触发器。您可以使用该触发器调用更新数据库的 lambda 函数。由于这一切都发生在 AWS 内,因此网络故障的可能性较小。
可以找到有关流的更多信息here