Complete Hosted Auth Sign-In
curl --request POST \
--url https://api.thefaithapp.com/v1/auth/complete \
--header 'Content-Type: application/json' \
--data '
{
"client_key": "your-public-client-key",
"redirect_uri": "https://example.com/auth/callback",
"firebase_id_token": "firebase-id-token",
"state": "random-state",
"code_challenge": "base64url-sha256-challenge",
"code_challenge_method": "S256"
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
client_key: 'your-public-client-key',
redirect_uri: 'https://example.com/auth/callback',
firebase_id_token: 'firebase-id-token',
state: 'random-state',
code_challenge: 'base64url-sha256-challenge',
code_challenge_method: 'S256'
})
};
fetch('https://api.thefaithapp.com/v1/auth/complete', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.thefaithapp.com/v1/auth/complete"
payload = {
"client_key": "your-public-client-key",
"redirect_uri": "https://example.com/auth/callback",
"firebase_id_token": "firebase-id-token",
"state": "random-state",
"code_challenge": "base64url-sha256-challenge",
"code_challenge_method": "S256"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"redirect_to": "https://example.com/auth/callback?code=one-time-code&state=random-state",
"member": {
"id": 1,
"name": "Jane Doe",
"email": "jane@example.com"
}
}{
"status": "Error",
"message": "The request could not be completed.",
"error": null,
"error_message": null,
"errors": {}
}{
"status": "Error",
"message": "The request could not be completed.",
"error": null,
"error_message": null,
"errors": {}
}{
"status": "Error",
"message": "The request could not be completed.",
"error": null,
"error_message": null,
"errors": {}
}{
"status": "Error",
"message": "The request could not be completed.",
"error": null,
"error_message": null,
"errors": {}
}Hosted Auth
Complete Hosted Auth Sign-In
Verifies the Firebase ID token produced by the hosted sign-in page and returns a callback URL containing a short-lived authorization code.
POST
/
v1
/
auth
/
complete
Complete Hosted Auth Sign-In
curl --request POST \
--url https://api.thefaithapp.com/v1/auth/complete \
--header 'Content-Type: application/json' \
--data '
{
"client_key": "your-public-client-key",
"redirect_uri": "https://example.com/auth/callback",
"firebase_id_token": "firebase-id-token",
"state": "random-state",
"code_challenge": "base64url-sha256-challenge",
"code_challenge_method": "S256"
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
client_key: 'your-public-client-key',
redirect_uri: 'https://example.com/auth/callback',
firebase_id_token: 'firebase-id-token',
state: 'random-state',
code_challenge: 'base64url-sha256-challenge',
code_challenge_method: 'S256'
})
};
fetch('https://api.thefaithapp.com/v1/auth/complete', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.thefaithapp.com/v1/auth/complete"
payload = {
"client_key": "your-public-client-key",
"redirect_uri": "https://example.com/auth/callback",
"firebase_id_token": "firebase-id-token",
"state": "random-state",
"code_challenge": "base64url-sha256-challenge",
"code_challenge_method": "S256"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"redirect_to": "https://example.com/auth/callback?code=one-time-code&state=random-state",
"member": {
"id": 1,
"name": "Jane Doe",
"email": "jane@example.com"
}
}{
"status": "Error",
"message": "The request could not be completed.",
"error": null,
"error_message": null,
"errors": {}
}{
"status": "Error",
"message": "The request could not be completed.",
"error": null,
"error_message": null,
"errors": {}
}{
"status": "Error",
"message": "The request could not be completed.",
"error": null,
"error_message": null,
"errors": {}
}{
"status": "Error",
"message": "The request could not be completed.",
"error": null,
"error_message": null,
"errors": {}
}Body
application/json
Public client key copied from Developer Access.
The same saved callback URL used to start sign-in.
Firebase ID token returned by the hosted sign-in page.
State value returned unchanged to the callback.
Required string length:
16 - 2048Required S256 PKCE challenge.
Required string length:
43 - 128Pattern:
^[A-Za-z0-9\-._~]+$PKCE challenge method.
Available options:
S256 Response
Hosted sign-in completed.
The response is of type object.
Was this page helpful?