wooden-nightfall-55264
05/23/2024, 10:23 PMbillowy-actor-35983
05/24/2024, 6:34 AMNext I want to make authenticated API calls to the server. How should I approach this? And in general, how would one store users in a database if the identity is being handled by a third party (Ory)?@wooden-nightfall-55264, if you also have access and control over the server codebase, you could configure Ory Identity (Kratos) to send webhooks to the server after the registration. 1. This webhook will send the newly created identity (user) to the server 2. The server handles the request and create an internal user 3. The server creates a binding between the Ory identity and the user by assigning the
user.id
value to identity.metadata_public.id
4. The server returns the mutated identity in the JSON responsebillowy-actor-35983
05/24/2024, 6:36 AMWhoami
endpoint and retrieve the session that also contains the identity.magnificent-energy-493
wooden-nightfall-55264
05/24/2024, 3:45 PMmagnificent-energy-493