При использовании AWS cognito, когда я использую cognitoUser.globalSignOut()
и успешно выхожу из системы, URL-адрес обратного вызова, который у меня есть в моем пользовательском пуле -> интеграция приложения -> настройки клиента приложения, не вызывается.
Есть идеи?
const signOut = (cognitoUser) => {
cognitoUser.globalSignOut({
onSuccess: function(result) {
console.log('success');
console.log(result);
},
onFailure: function(err) {
console.dir(err);
console.log(err.message || JSON.stringify(err));
},
});
};
const init = () => {
const authenticationDetails =
new AmazonCognitoIdentity.AuthenticationDetails(authenticationData);
const cognitoUser = new AmazonCognitoIdentity.CognitoUser(userData);
cognitoUser.authenticateUser(authenticationDetails, {
onSuccess: function(result) {
const accessToken = result.getAccessToken().getJwtToken();
setTimeout(()=> signOut(cognitoUser), 2000);
},
onFailure: function(err) {
console.log(err.message || JSON.stringify(err));
},
});
![enter image description here](https://i.stack.imgur.com/p7o0C.png)