Account Deletion
Allow end-users to initiate account deletion within the apps.
Last updated
Was this helpful?
Was this helpful?
// This method blocks until the user closes User Settings.
await authgear.open(Page.Settings);
// One way to verify the validity of the session is to get User Info once.
await authgear.fetchUserInfo();// This method blocks until the user closes User Settings.
await authgear.open(SettingsPage.settings);
// One way to verify the validity of the session is to get User Info once.
await authgear.getUserInfo();// This method blocks until the user closes User Settings.
await authgear.OpenAsync(SettingsPage.Settings);
// One way to verify the validity of the session is to get User Info once.
await authgear.FetchUserInfoAsync();authgear
.deleteAccount({
redirectURI: "<POST_DELETE_REDIRECT_URI>",
//the same redirectURI as in authentication
colorScheme: colorScheme as ColorScheme,
})_authgear.deleteAccount(
redirectURI: "<POST_DELETE_REDIRECT_URI>",
//the same redirectURI as in authentication
);SettingsActionOptions options = new SettingsActionOptions(
"<POST_DELETE_REDIRECT_URI>"
//the same redirectURI as in authentication
);
options.setColorScheme(getColorScheme());
mAuthgear.deleteAccount(options, new OnOpenSettingsActionListener() {
@Override
public void onFinished() {
mIsLoading.setValue(false);
Log.d(TAG, "deleteAccount finished");
}
@Override
public void onFailed(Throwable throwable) {
Log.d(TAG, throwable.toString());
mIsLoading.setValue(false);
setError(throwable);
}
});authgear?.deleteAccount(
colorScheme: self.colorScheme,
redirectURI: "<POST_DELETE_REDIRECT_URI>"
//the same redirectURI as in authentication
) { result in
switch result {
case .success:
self.successAlertMessage = "Deleted account successfully"
case let .failure(error):
self.setError(error)
}
}mutation {
scheduleAccountDeletion(input: {
userID: "USER_ID"
}) {
user {
id
isDisabled
isDeactivated
disableReason
deleteAt
}
}
}mutation {
deleteUser(input: {
userID: "USER_ID"
}) {
deletedUserID
}