diff --git a/apps/docs/content/guides/auth/auth-anonymous.mdx b/apps/docs/content/guides/auth/auth-anonymous.mdx index cf0ee68c4c7..4ccb77a3181 100644 --- a/apps/docs/content/guides/auth/auth-anonymous.mdx +++ b/apps/docs/content/guides/auth/auth-anonymous.mdx @@ -148,10 +148,10 @@ try await supabase.auth.updateUser( -You can use the [`modifyUser()`](/docs/reference/kotlin/auth-updateuser) method to link an email or phone identity to the anonymous user. +You can use the [`updateUser()`](/docs/reference/kotlin/auth-updateuser) method to link an email or phone identity to the anonymous user. ```kotlin -supabase.auth.modifyUser { +supabase.auth.updateUser { email = "example@email.com" } ``` diff --git a/apps/docs/content/guides/auth/debugging/error-codes.mdx b/apps/docs/content/guides/auth/debugging/error-codes.mdx index 92392b22fc0..1116fbd4778 100644 --- a/apps/docs/content/guides/auth/debugging/error-codes.mdx +++ b/apps/docs/content/guides/auth/debugging/error-codes.mdx @@ -59,16 +59,15 @@ Errors originating from the server API classed as `AuthApiError` always have a ` -All errors originating from the `supabase.auth` namespace of the JavaScript client library will be wrapped by the `AuthError` class. +All exceptions originating from the `supabase.auth` namespace of the Kotlin client library will be a subclass of `RestException`. -Error objects are split in a few classes: +Rest exceptions are split into a few classes: -- `AuthApiError` -- errors which originate from the Supabase Auth API. - - Use `isAuthApiError` instead of `instanceof` checks to see if an error you caught is of this type. -- `CustomAuthError` -- errors which generally originate from state in the client library. - - Use the `name` property on the error to identify the class of error received. +- `AuthRestException` -- exceptions which originate from the Supabase Auth API and have a `errorCode` property that can be used to identify the error returned by the server. +- `AuthWeakPasswordException` -- an `AuthRestException` which indicates that the password is too weak. +- `AuthSessionMissingException` -- an `AuthRestException` which indicates that the session is missing, if the user was logged out or deleted. -Errors originating from the server API classed as `AuthApiError` always have a `code` property that can be used to identify the error returned by the server. The `status` property is also present, encoding the HTTP status code received in the response. +All instances and subclasses of a `AuthRestException` have a `errorCode` property that can be used to identify the error returned by the server. diff --git a/apps/docs/content/guides/auth/phone-login.mdx b/apps/docs/content/guides/auth/phone-login.mdx index b42005f47c1..aa006d73d04 100644 --- a/apps/docs/content/guides/auth/phone-login.mdx +++ b/apps/docs/content/guides/auth/phone-login.mdx @@ -215,6 +215,15 @@ try await supabase.auth.updateUser( ) ``` + + + +```kotlin +supabase.auth.updateUser { + phone = "123456789" +} +``` + diff --git a/apps/docs/docs/ref/kotlin/installing.mdx b/apps/docs/docs/ref/kotlin/installing.mdx index c3eb71b2374..93a918c49ff 100644 --- a/apps/docs/docs/ref/kotlin/installing.mdx +++ b/apps/docs/docs/ref/kotlin/installing.mdx @@ -30,6 +30,8 @@ custom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supab Checkout the different READMEs for information about supported Kotlin targets. + *Note that the minimum Android SDK version is 26. For lower versions, you need to enable [core library desugaring](https://developer.android.com/studio/write/java8-support#library-desugaring).* +