Sign in/up with third party
Signin/up a user
POST
/{apiBasePath}/{tenantId}/signinupPath parameters
apiBasePathstringrequiredIts value depends on the apiBasePath set by the user
tenantIdstringThe tenant against which the request is made. If left empty, the default tenant will be used.
Header parameters
ridstringThe third party recipe ID
Request body
application/jsonOne of:
object
thirdPartyIdthirdPartyIdrequiredThird party provider identifier
clientTypeclientTypeType of client making the request
redirectURIInfoobjectrequiredShow propertiesHide properties
redirectURIOnProviderDashboardredirectURIrequiredURL to redirect to after authentication
redirectURIQueryParamsobjectrequiredpkceCodeVerifierstringshouldTryLinkingWithSessionUserbooleanobject
thirdPartyIdthirdPartyIdrequiredThird party provider identifier
clientTypeclientTypeType of client making the request
oAuthTokensoAuthTokensrequiredOAuth tokens
Show propertiesHide properties
access_tokenstringOAuth access token
id_tokenstringOAuth ID token
shouldTryLinkingWithSessionUserbooleanResponses
200Signin/up a user
One of:
signinupResponse
statusstatusOKSuccess status indicator
Allowed:
OKuseruserUser information
Show propertiesHide properties
iduserIdUnique identifier for a user
timeJoinednumberTimestamp when user joined
isPrimaryUserbooleanWhether this is the primary user account
tenantIdsstring[]List of tenant IDs the user belongs to
emailsstring[]List of user's email addresses
phoneNumbersstring[]List of user's phone numbers
thirdPartyobject[]List of third party accounts
Show propertiesHide properties
Array of
objectidstringThird party provider ID
userIdstringUser ID in the third party system
loginMethodsobject[]List of login methods available to the user
Show propertiesHide properties
Array of
objectrecipeIdstringThe recipe ID for this login method
Allowed:
emailpasswordthirdpartypasswordlessrecipeUserIduserIdUnique identifier for a user
verifiedbooleanWhether this login method is verified
tenantIdsstring[]List of tenant IDs for this login method
timeJoinednumberTimestamp when this login method was added
emailstringEmail address for this login method
phoneNumberstringPhone number for this login method
thirdPartyobjectThird party information for this login method
Show propertiesHide properties
idstringThird party provider ID
userIdstringUser ID in the third party system
createdNewRecipeUserbooleanWhether a new recipe user was created
signinupErrorResponse
One of:
object
statusstringError status
Allowed:
NO_EMAIL_GIVEN_BY_PROVIDERobject
statusstringError status
Allowed:
SIGN_IN_UP_NOT_ALLOWEDreasonstringReason why sign in/up is not allowed
generalErrorResponse
statusstringError status code
Allowed:
GENERAL_ERRORmessagestringError message
403A claim validation error happened during factor setup
One of:
object
messagestringError message
claimValidationErrorsobject[]List of claim validation errors
Show propertiesHide properties
Array of
objectidstringThe claim ID
reasonobjectThe reason for the validation error
object
messagestringError message
claimValidationErrorsobject[]List of claim validation errors
Show propertiesHide properties
Array of
objectidstringThe claim ID
reasonstringThe reason for the validation error
404Resource not found error
string500Internal server error
stringTry it
Server
Parameters
Bodyapplication/json
Request
curl -X POST "/auth/public/signinup" \
-H "Content-Type: application/json" \
-d '{
"thirdPartyId": "google",
"clientType": "web",
"redirectURIInfo": {
"redirectURIOnProviderDashboard": "https://yourdomain.com/callback",
"redirectURIQueryParams": {
"code": "neqmpdsfuqe141m5lk437867masdf",
"state": "ljayfgqewertbh13245njw0"
},
"pkceCodeVerifier": "abcd1234"
},
"shouldTryLinkingWithSessionUser": false
}'const response = await fetch("/auth/public/signinup", {
method: "POST",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify({
"thirdPartyId": "google",
"clientType": "web",
"redirectURIInfo": {
"redirectURIOnProviderDashboard": "https://yourdomain.com/callback",
"redirectURIQueryParams": {
"code": "neqmpdsfuqe141m5lk437867masdf",
"state": "ljayfgqewertbh13245njw0"
},
"pkceCodeVerifier": "abcd1234"
},
"shouldTryLinkingWithSessionUser": false
})
});import requests
response = requests.post(
"/auth/public/signinup",
headers={
"Content-Type": "application/json"
},
json={
"thirdPartyId": "google",
"clientType": "web",
"redirectURIInfo": {
"redirectURIOnProviderDashboard": "https://yourdomain.com/callback",
"redirectURIQueryParams": {
"code": "neqmpdsfuqe141m5lk437867masdf",
"state": "ljayfgqewertbh13245njw0"
},
"pkceCodeVerifier": "abcd1234"
},
"shouldTryLinkingWithSessionUser": False
},
)Response
{
"status": "OK",
"user": {
"id": "fa7a0841-b533-4478-95533-0fde890c3483",
"timeJoined": 1638433545183,
"isPrimaryUser": true,
"tenantIds": [
"public"
],
"emails": [
"[email protected]"
],
"phoneNumbers": [
36201234123
],
"thirdParty": [
{
"id": "google",
"userId": "rq238mrq2389rvq123213"
}
],
"loginMethods": [
{
"recipeId": "emailpassword",
"recipeUserId": "fa7a0841-b533-4478-95533-0fde890c3483",
"verified": true,
"tenantIds": [
"public"
],
"timeJoined": 1638433545183,
"email": "[email protected]",
"phoneNumber": 36201234123,
"thirdParty": {
"id": "google",
"userId": "rq238mrq2389rvq123213"
}
}
]
},
"createdNewRecipeUser": true
}{
"message": "invalid claim",
"claimValidationErrors": [
{
"id": "st-ev",
"reason": {
"message": "wrong value",
"expectedValue": true,
"actualValue": false
}
}
]
}"Not Found""Internal Error"