<BlockSwitcher>
<Block name="Java">

```java
AuthSignOutOptions options = AuthSignOutOptions.builder()
    .globalSignOut(true)
    .build();

Amplify.Auth.signOut(options, signOutResult -> {
    if (signOutResult instanceof AWSCognitoAuthSignOutResult.CompleteSignOut) {
        // handle successful sign out
    } else if (signOutResult instanceof AWSCognitoAuthSignOutResult.PartialSignOut) {
        // handle partial sign out
    } else if (signOutResult instanceof AWSCognitoAuthSignOutResult.FailedSignOut) {
        // handle failed sign out
    }
});
```

</Block>
<Block name="Kotlin - Callbacks">

```kotlin
val options = AuthSignOutOptions.builder()
    .globalSignOut(true)
    .build()

Amplify.Auth.signOut(options) { signOutResult ->
    when(signOutResult) {
        is AWSCognitoAuthSignOutResult.CompleteSignOut -> {
            // handle successful sign out
        }
        is AWSCognitoAuthSignOutResult.PartialSignOut -> {
            // handle partial sign out
        }
        is AWSCognitoAuthSignOutResult.FailedSignOut -> {
            // handle failed sign out
        }
    }
}
```

</Block>
<Block name="Kotlin - Coroutines">

```kotlin
val options = AuthSignOutOptions.builder()
    .globalSignOut(true)
    .build()

val signOutResult = Amplify.Auth.signOut(options)

when(signOutResult) {
    is AWSCognitoAuthSignOutResult.CompleteSignOut -> {
        // handle successful sign out
    }
    is AWSCognitoAuthSignOutResult.PartialSignOut -> {
        // handle partial sign out
    }
    is AWSCognitoAuthSignOutResult.FailedSignOut -> {
        // handle failed sign out
    }
}
```

</Block>
<Block name="RxJava">

```java
AuthSignOutOptions options = AuthSignOutOptions.builder()
    .globalSignOut(true)
    .build();
    
RxAmplify.Auth.signOut(options)
    .subscribe(signOutResult -> {
        if (signOutResult instanceof AWSCognitoAuthSignOutResult.CompleteSignOut) {
            // handle successful sign out
        } else if (signOutResult instanceof AWSCognitoAuthSignOutResult.PartialSignOut) {
            // handle partial sign out
        } else if (signOutResult instanceof AWSCognitoAuthSignOutResult.FailedSignOut) {
            // handle failed sign out
        }
    });
```

</Block>
</BlockSwitcher> 
