rough-agency-54206
09/20/2024, 4:49 PMchilly-king-10285
09/20/2024, 4:49 PMchilly-king-10285
09/20/2024, 4:49 PMtraits field to populate the identity's traits. This is particularly useful as some providers, like Apple, only include the user's email in the ID Token. Here is an example from the API reference: json { 'traits': { 'description': 'The identity traits', 'type': 'object' } } This field must be populated with the identity traits you want to include in the ID Token. Please note that the traits field is part of the request body for the updateRegistrationFlow method in the Ory API. For more details, you can refer to the [Ory API Reference](https://www.ory.sh/docs/reference/api).rough-agency-54206
09/20/2024, 4:51 PMchilly-king-10285
09/20/2024, 4:51 PMchilly-king-10285
09/20/2024, 4:51 PMclient_id as used in your native app. 2. Optional: Android apps generate different token audiences per distribution (debug, release, etc.). You can add the ID of your current distribution to the additional_id_token_audiences field. 3. If your SDK supports nonce validation, make sure to use a generated value and submit that during the next step. 4. Obtain an id_token from Google using the Google SDK. Make sure to also submit the nonce if you generated one in the step before. 5. Submit the id_token and nonce (as the id_token_nonce) as part of the updateRegistrationFlow or updateLoginFlow request to Ory. 6. Ory will validate the id_token and create an identity and optionally a session (if configured). The id_token is verified using Google's publicly available signing keys, available under https://www.googleapis.com/oauth2/v3/certs. For managing user traits post-signup, you can use the Ory Identities Admin API. Traits are the data associated with an identity and can be modified by the identity owner or by users with Admin API access. Ory uses JSON Schema to validate Identity traits. You can modify these traits as per your requirements. Here's an example of how to create an identity and set its traits using a POST request: bash curl --request POST -sL \ --header "Authorization: Bearer ory_pat_xRKLsFEOUFQFVBjd6o3FQDifaLYhabGd" \ --header "Content-Type: application/json" \ --data '{ "schema_id": "<preset://email>", "traits": { "email": "[[email protected]]" } }' <https://playground.projects.oryapis.com/admin/identities> For more details, you can refer to the [Ory Documentation](https://www.ory.sh/docs/kratos/social-signin/google#using-the-google-sdk-on-native-apps) and [Ory API Reference](https://www.ory.sh/docs/reference/api).rough-agency-54206
09/20/2024, 4:52 PMrough-agency-54206
09/20/2024, 4:59 PMchilly-king-10285
09/20/2024, 4:59 PMchilly-king-10285
09/20/2024, 5:00 PM