Webcom Android SDK Public API Reference / com.orange.webcom.sdkv2.authentication / AuthenticationService / detachIdentity

detachIdentity

@JvmOverloads fun detachIdentity(callback: WebcomDoneCallback? = null): Unit

Removes the last identity (or authentication means) of the currently authenticated user from the Webcom Authentication service. This operation is asynchronous and calls the given callback once performed.

This method doesn't remove the user account itself, meaning that s·he can still authenticate with other remaining identities (or authentication means). However, if the removed identity was the last available one to authenticate the user account, then the whole account is removed (just as the destroyAccount method would).

This sensitive operation fails if no user is currently authenticated or if the user has been authenticated for a too long time (in this case, her·his authentication needs to be refreshed by authenticating again).

Note about GDPR: this method permanently destroys all authentication data both related to the user identity (or authentication means) and managed by the Webcom Authentication service itself. In any case, it cannot destroy any personal data stored and managed by the application that would be related to the deleted identity (for example profile data that would be stored using the DatasyncService), as the Webcom back end cannot be aware of them. You are responsible for deleting such data yourself.