stocky-lion-92458
01/28/2025, 3:11 PM{
"amr": [
"oidc"
],
"aud": [
"ce7fd896-ee73-4785-b5f1-4aebfdc1a1c9"
],
"auth_time": 1637735144,
"iat": 1618069753,
"iss": "<https://somedomain.com>",
"rat": 1738069749,
"sub": "7e4de2r7-c700-4c7f-be34-3b5d02tay116"
}
the custom identity schema template is
{
"$id": "<https://schemas.ory.sh/presets/kratos/identity.blank.schema.json>",
"title": "SSO-V10",
"type": "object",
"properties": {
"traits": {
"type": "object",
"properties": {
"email": {
"title": "Email",
"type": "string",
"format": "email",
"ory.sh/kratos": {
"credentials": {
"password": {
"identifier": true
}
}
}
},
"first_name": {
"title": "First Name",
"type": "string"
},
"last_name": {
"title": "Last Name",
"type": "string"
},
"phone_no": {
"type": "number",
"title": "Phone number"
},
"country_code": {
"type": "string",
"title": "Country Code"
},
"company": {
"type": "object",
"properties": {
"company_name": {
"type": "string",
"title": "Company Name"
},
"company_address": {
"type": "object",
"properties": {
"address_line_1": {
"type": "string",
"title": "Address Line 1"
},
"address_line_2": {
"type": "string",
"title": "Address Line 2"
},
"city": {
"type": "string",
"title": "City"
},
"state": {
"type": "string",
"title": "State/Province"
},
"country": {
"type": "string",
"title": "Country"
},
"zip_code": {
"type": "string",
"title": "Zip Code"
}
},
"required": []
}
},
"required": []
}
},
"required": [
"email"
],
"additionalProperties": true
}
},
"$schema": "<http://json-schema.org/draft-07/schema#>"
}
,I'm using SSO provider as google OIDC
Data Mapping:
local claims = {
email_verified: true,
} + std.extVar('claims');
{
identity: {
traits: {
-- Check if email exists and if it's verified, then map it to 'email'
email: if 'email' in claims && claims.email_verified then claims.email else null,
-- Map other claims as required
first_name: claims.given_name,
last_name: claims.family_name,
},
},
}
scopes:
email ,openid,profile
gray-library-49237
01/28/2025, 11:38 PMstocky-lion-92458
01/30/2025, 5:41 PMcurl --request PUT -sL \
--header "Authorization: Bearer ory_pat_your_project_api_token" \
--header "Content-Type: application/json" \
--data '{
"schema_id": "<preset://email>",
"traits": {
"email": "<mailto:user@example.com|user@example.com>"
},
"verifiable_addresses": [
{
"value": "<mailto:user@example.com|user@example.com>",
"verified": true,
"via": "email",
"status": "completed"
}
]
}' <https://your_project_slug.projects.oryapis.com/admin/identities>
,do we have any way to skip this and directly verify it and keep email_verififed:true or verified_addresses parametr validate so that oidc reponds email in it's response body