---
title: readIdentity
description: >-
  Who sent `request`: the provider account they signed in with, or `null` when
  nobody is signed in or their account is suspended. `env` is the handler's
  `context.env`. Without a usable `PRIVATE_SVARTZ_SESSION_SECRET` nobody can be
  signed in, so this answers `null`; the auth routes report the missing secret
  with a 503. Plugins that need a person rather than a provider account use
  `readAccount`.
updated_at: '2026-11-19T12:10:41+01:00'
created_at: '2026-11-19T02:32:38+01:00'
symbol:
  kind: function
  name: readIdentity
  signatures:
    - >-
      readIdentity(request: Request, env: Env$3):
      Promise<[[reference/api/auth/Identity|Identity]] | null>
  parameters:
    - name: request
      type: Request
    - name: env
      type: Env$3
  returns:
    type: 'Promise<[[reference/api/auth/Identity|Identity]] | null>'
  source: >-
    https://github.com/mia-cx/svartz/blob/711f3906a713c8b9a5a572d0f34c85e90c3bc3d1/packages/auth/src/session.ts#L181
---

# readIdentity
