Skip to content

Commit

Permalink
Rename resendPhone phoneNumber parameter to phone.
Browse files Browse the repository at this point in the history
  • Loading branch information
jan-tennert committed Mar 8, 2024
1 parent f8c086a commit 48cd7db
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -188,13 +188,13 @@ sealed interface Auth : MainPlugin<AuthConfig>, CustomSerializationPlugin {
/**
* Resends an existing SMS OTP or phone change OTP.
* @param type The phone otp type
* @param phoneNumber The phone to resend the otp to
* @param phone The phone to resend the otp to
* @param captchaToken The captcha token to use
* @throws RestException or one of its subclasses if receiving an error response
* @throws HttpRequestTimeoutException if the request timed out
* @throws HttpRequestException on network related issues
*/
suspend fun resendPhone(type: OtpType.Phone, phoneNumber: String, captchaToken: String? = null)
suspend fun resendPhone(type: OtpType.Phone, phone: String, captchaToken: String? = null)

/**
* Sends a password reset email to the user with the specified [email]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -244,10 +244,10 @@ internal class AuthImpl(

override suspend fun resendPhone(
type: OtpType.Phone,
phoneNumber: String,
phone: String,
captchaToken: String?
) = resend(type.type) {
put("phone", phoneNumber)
put("phone", phone)
captchaToken?.let {
putJsonObject("gotrue_meta_security") {
put("captcha_token", captchaToken)
Expand Down

0 comments on commit 48cd7db

Please sign in to comment.