---
title: "completeAuth"
source: "https://github.com/remix-run/remix/blob/8905f3943706e1f53696ab83e70a84873cabfc90/packages/auth/src/lib/complete-auth.ts#L12"
---

# completeAuth

## Summary

Rotates the current session id and returns the fresh session for auth writes.

## Signature

```ts
function completeAuth<context extends RequestContext<any, any>>(context: context): Session

```

## Returns

The current session after its id has been regenerated.