Third-party callbacks
Run an internal function from a verified callback when nobody is signed in.
A third-party callback gets its authority from proof that you check at the edge.
Check the proof
Check the provider’s signature or the auth library’s token before accepting its data. Use the identity from the verified callback as input.
Use a signed-out caller
Run an internal function with your app’s signed-out scope. Reserve system scopes for trusted app code.
// The auth library supplies the verified identity and signed reset link.
onResetPassword: ({ user, url }) =>
registry.as(signedOut).run(accounts.requestReset, { userId: user.id, url }),Send the email after commit
Emit an event from the mutation. Send the email in a listener. Use a worker, queue, or waitUntil so the response does not wait for the email.
Return the same response for known and unknown addresses.