All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.com.supertokens.sdk.recipes.emailverification.usecases.CheckEmailVerifiedUseCase.kt Maven / Gradle / Ivy

The newest version!
package com.supertokens.sdk.recipes.emailverification.usecases

import com.supertokens.sdk.common.Routes
import com.supertokens.sdk.common.responses.VerifyEmailResponseDTO
import io.ktor.client.HttpClient
import io.ktor.client.call.body
import io.ktor.client.request.get

internal class CheckEmailVerifiedUseCase(
    private val client: HttpClient,
) {

  suspend fun checkEmailVerified(): Boolean {
    val response = client.get(Routes.EmailVerification.CHECK_VERIFIED)

    val body = response.body()

    return body.isVerified == true
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy