Last active
May 8, 2025 14:25
-
-
Save tdcolvin/7ddf6052262b7aff919ad9ef6f2f1f1f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Get the registration options from the auth server | |
| suspend fun getPasskeyRegisterRequestJson(username: String): String | |
| = withContext(Dispatchers.IO) { | |
| val url = HttpUrl.Builder() | |
| .scheme("https") | |
| .host("auth.tomcolvin.co.uk") | |
| .addPathSegment("generate-registration-options") | |
| .addQueryParameter("username", username) | |
| .build() | |
| val request = Request.Builder() | |
| .url(url) | |
| .build() | |
| val response = okHttpClient.newCall(request).execute() | |
| response.body?.string() ?: throw Exception("No response body") | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment