# NextAuth: JWEDecryptionFailed: decryption operation failed

**Code:** `JWEDecryptionFailed` · **Category:** Authentication · **Seen on:** Next.js

The session cookie cannot be decrypted because NEXTAUTH_SECRET changed or differs.

## Meaning

Session JWTs are encrypted with NEXTAUTH_SECRET. If the secret differs between builds or servers, or an old cookie from another secret remains, decryption fails.

## Common causes

- Secret changed
- Different secrets
- Old cookie
- Secret regenerated on each deploy

## Quick fix

1. Clear cookies
2. Use one secret
3. Clear the site's cookies once
4. Set a single stable NEXTAUTH_SECRET in all environments

## Detailed fix by platform

### Env

1. Keep `NEXTAUTH_SECRET` identical everywhere

## How to diagnose

1. **Secret** — Same?
2. **Cookie** — Cleared?

---
Source: [WhatIsMyError](https://whatismyerror.com/errors/auth/nextauth-jwt-decryption-failed)
