Created
May 9, 2025 23:15
-
-
Save tdcolvin/5fbeeccc92572f5bb5935cc2a524d03b 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
| suspend fun getPasskeyAuthenticationRequestJson(username: String): String = withContext( | |
| Dispatchers.IO) { | |
| val url = HttpUrl.Builder() | |
| .scheme("https") | |
| .host("auth.tomcolvin.co.uk") | |
| .addPathSegment("generate-authentication-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