{"id":13812291,"url":"https://github.com/supabase-community/gotrue-kt","last_synced_at":"2025-05-14T21:32:30.838Z","repository":{"id":37931767,"uuid":"332539050","full_name":"supabase-community/gotrue-kt","owner":"supabase-community","description":"Kotlin Client for GoTrue API","archived":true,"fork":false,"pushed_at":"2023-11-01T23:00:09.000Z","size":116,"stargazers_count":20,"open_issues_count":2,"forks_count":3,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-05-09T12:27:49.565Z","etag":null,"topics":["api","client","gotrue","gradle","http","jackson","kotlin"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/supabase-community.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-01-24T19:39:09.000Z","updated_at":"2025-02-24T20:57:57.000Z","dependencies_parsed_at":"2024-08-04T04:02:08.977Z","dependency_job_id":"95d5a03d-eacb-4a92-bff5-febc00999371","html_url":"https://github.com/supabase-community/gotrue-kt","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/supabase-community%2Fgotrue-kt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/supabase-community%2Fgotrue-kt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/supabase-community%2Fgotrue-kt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/supabase-community%2Fgotrue-kt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/supabase-community","download_url":"https://codeload.github.com/supabase-community/gotrue-kt/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254036842,"owners_count":22003654,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","client","gotrue","gradle","http","jackson","kotlin"],"created_at":"2024-08-04T04:00:50.418Z","updated_at":"2025-05-14T21:32:30.754Z","avatar_url":"https://github.com/supabase-community.png","language":"Kotlin","funding_links":[],"categories":["GoTrue"],"sub_categories":[],"readme":"# Kotlin Client for GoTrue\r\n\r\n\u003e **Warning**\r\n\u003e This repository is archived. Use [supabase-kt](https://github.com/supabase-community/supabase-kt) instead to use Supabase in your Kotlin projects.\r\n\r\n\r\nKotlin JVM client for [Netlify's GoTrue API](https://github.com/netlify/gotrue).\r\n\r\nComes with DTOs for the responses to enable type-safe access.\r\n\r\n![Java CI with Gradle](https://img.shields.io/github/workflow/status/supabase/gotrue-kt/Java%20CI%20with%20Gradle?label=BUILD\u0026style=for-the-badge)\r\n![Gradle Package](https://img.shields.io/github/workflow/status/supabase/gotrue-kt/Gradle%20Package?label=PUBLISH\u0026style=for-the-badge)\r\n![Bintray](https://img.shields.io/bintray/v/supabase/supabase/gotrue-kt?style=for-the-badge)\r\n\r\n## Installation\r\n\r\nMaven\r\n\r\n```xml\r\n\u003cdependency\u003e\r\n    \u003cgroupId\u003eio.supabase\u003c/groupId\u003e\r\n    \u003cartifactId\u003egotrue-kt\u003c/artifactId\u003e\r\n    \u003cversion\u003e{version}\u003c/version\u003e\r\n    \u003ctype\u003epom\u003c/type\u003e\r\n\u003c/dependency\u003e\r\n```\r\n\r\nGradle\r\n\r\n```groovy\r\nimplementation 'io.supabase:gotrue-kt:{version}'\r\n```\r\n\r\n## Usage\r\n\r\n```kotlin\r\nval goTrueClient = GoTrueClient.defaultGoTrueClient(\r\n    url = \"\u003cbase-url\u003e\",\r\n    headers = mapOf(\"Authorization\" to \"foo\", \"apiKey\" to \"bar\")\r\n)\r\n\r\ntry {\r\n    goTrueClient.invite(\"e@ma.il\")\r\n\r\n    val updatedUser = goTrueClient.updateUser(\r\n        accessToken = \"eyJ...\", // read from request header\r\n        data = mapOf(\r\n                \"admin\" = true\r\n        )\r\n    )\r\n\r\n    println(updatedUser.updatedAt)\r\n} catch (exc: GoTrueHttpException) {\r\n    // Exception is thrown on bad status (anything above 300)\r\n    println(\"Oops, status: ${exc.status}, body:\\n${exc.httpBody}\")\r\n}\r\n```\r\n\r\nYou can also customize the DTO for example if you turn off email verification\r\n\r\n```kotlin\r\ndata class CustomGoTrueUserResponse(\r\n    val accessToken: String,\r\n    val tokenType: String,\r\n    val refreshToken: String,\r\n    val user: User\r\n)\r\n\r\ndata class User(\r\n    val id: UUID,\r\n    val email: String,\r\n    val phone: String\r\n\r\n)\r\n\r\nGoTrueClient.customApacheJacksonGoTrueClient\u003cCustomGoTrueUserResponse, GoTrueTokenResponse\u003e(\r\n    url = \"\u003cbase-url\u003e\",\r\n    headers = mapOf(\"Authorization\" to \"foo\", \"apiKey\" to \"bar\")\r\n)\r\n```\r\n\r\nIf you are using [supabase](https://supabase.io/), the base URL will be `https://\u003cyour-project-id\u003e.supabase.co/auth/v1`\r\n\r\n## HTTP / (De)-Serialization\r\n\r\nThe Apache Http-Client (5.x) is used for executing HTTP calls, Jackson is used to convert responses to DTOs.\r\n\r\nIf you want to change that, you need to implement the `GoTrueHttpClient` and the `GoTrueJsonConverter` interface.\r\n\r\nSee [GoTrueHttpClientApache](src/main/kotlin/io/supabase/gotrue/http/GoTrueHttpClientApache.kt) and [GoTrueJsonConverterJackson](src/main/kotlin/io/supabase/gotrue/json/GoTrueJsonConverterJackson.kt).\r\n\r\n```kotlin\r\nGoTrueClient.goTrueClient\u003cGoTrueUserResponse,GoTrueTokenResponse\u003e(\r\n    goTrueHttpClient = { customHttpClient() },\r\n    goTrueJsonConverter = customConverter()\r\n)\r\n```\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsupabase-community%2Fgotrue-kt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsupabase-community%2Fgotrue-kt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsupabase-community%2Fgotrue-kt/lists"}