Add delete account feature to mobile app
- DELETE /api/auth/account/ API call in AuthApi + APILayer - authProvider field on User model for email vs social auth detection - DeleteAccountDialog with password (email) or "type DELETE" (social) confirmation - Red "Delete Account" card on ProfileScreen - Navigation wired in App.kt (clears data, returns to login) - 10 i18n strings in strings.xml - ViewModel unit tests for delete account state
This commit is contained in:
@@ -16,6 +16,7 @@ data class User(
|
||||
@SerialName("is_active") val isActive: Boolean = true,
|
||||
@SerialName("date_joined") val dateJoined: String,
|
||||
@SerialName("last_login") val lastLogin: String? = null,
|
||||
@SerialName("auth_provider") val authProvider: String? = null,
|
||||
// Profile is included in CurrentUserResponse (/auth/me)
|
||||
val profile: UserProfile? = null,
|
||||
// Verified is returned directly in LoginResponse, and also in profile for CurrentUserResponse
|
||||
@@ -206,3 +207,12 @@ data class GoogleSignInResponse(
|
||||
val user: User,
|
||||
@SerialName("is_new_user") val isNewUser: Boolean
|
||||
)
|
||||
|
||||
/**
|
||||
* Delete account request matching Go API
|
||||
*/
|
||||
@Serializable
|
||||
data class DeleteAccountRequest(
|
||||
val password: String? = null,
|
||||
val confirmation: String? = null
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user