## TL;DR

Fixed in @nangohq/frontend 0.36.31 via PR #1299. Update the frontend SDK to that version or later.

## Steps

1. Fixed in @nangohq/frontend 0.36.31 via PR #1299. Update the frontend SDK to that version or later. The reporter confirmed the fix works perfectly.

## When to use

You are seeing this: The Nango frontend SDK throws The authorization window was closed before the authorization flow was completed even though the OAuth popup completes successfully. Use this skill when you run into "Nango frontend SDK throws authorization window was closed before the authorization flow was completed".

## When not to use

If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.

## Versions

Versions mentioned in the source: nangohqfrontend 0.36.31. If you are on something much newer or older, the details may have shifted.

## Why this happens

The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.

## Sources

- https://github.com/NangoHQ/nango/issues/1251
