Begin passkey registration
curl --request POST \
--url https://prod-auth.tktchurch.com/api/v1/users/me/webauthn/register/begin \
--header 'Authorization: Bearer <token>'import Foundation
let url = URL(string: "https://prod-auth.tktchurch.com/api/v1/users/me/webauthn/register/begin")!
var request = URLRequest(url: url)
request.httpMethod = "POST"
request.timeoutInterval = 10
request.allHTTPHeaderFields = ["Authorization": "Bearer <token>"]
let (data, _) = try await URLSession.shared.data(for: request)
print(String(decoding: data, as: UTF8.self))const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://prod-auth.tktchurch.com/api/v1/users/me/webauthn/register/begin', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://prod-auth.tktchurch.com/api/v1/users/me/webauthn/register/begin"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text){
"challenge": "dGhlLWNoYWxsZW5nZQ",
"rp": {
"name": "TKTChurch"
}
}{
"error": "invalid_request",
"error_description": "Redirect URI not registered for this client"
}{
"error": "invalid_token",
"error_description": "Access token is invalid or malformed"
}Returns creation options for navigator.credentials.create().
POST
/
api
/
v1
/
users
/
me
/
webauthn
/
register
/
begin
Begin passkey registration
curl --request POST \
--url https://prod-auth.tktchurch.com/api/v1/users/me/webauthn/register/begin \
--header 'Authorization: Bearer <token>'import Foundation
let url = URL(string: "https://prod-auth.tktchurch.com/api/v1/users/me/webauthn/register/begin")!
var request = URLRequest(url: url)
request.httpMethod = "POST"
request.timeoutInterval = 10
request.allHTTPHeaderFields = ["Authorization": "Bearer <token>"]
let (data, _) = try await URLSession.shared.data(for: request)
print(String(decoding: data, as: UTF8.self))const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://prod-auth.tktchurch.com/api/v1/users/me/webauthn/register/begin', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://prod-auth.tktchurch.com/api/v1/users/me/webauthn/register/begin"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text){
"challenge": "dGhlLWNoYWxsZW5nZQ",
"rp": {
"name": "TKTChurch"
}
}{
"error": "invalid_request",
"error_description": "Redirect URI not registered for this client"
}{
"error": "invalid_token",
"error_description": "Access token is invalid or malformed"
}