You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/guides/frameworks/nango.mdx
+8-6Lines changed: 8 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -66,7 +66,7 @@ sequenceDiagram
66
66
npm install @nangohq/frontend
67
67
```
68
68
69
-
The frontend SDK requires a short-lived **connect session token** issued by your backend — this replaces the old public key approach. Add an API route that creates the session:
69
+
The frontend SDK requires a short-lived **connect session token** issued by your backend. Add an API route that creates the session:
returnNextResponse.json({ error: text }, { status: response.status });
92
+
}
93
+
88
94
const { data } =awaitresponse.json();
89
95
returnNextResponse.json({ token: data.token });
90
96
}
@@ -125,10 +131,6 @@ sequenceDiagram
125
131
}
126
132
```
127
133
128
-
<Note>
129
-
The session token expires after 30 minutes and is used only to open the OAuth popup — it is not stored. The `connectionId` returned by `nango.auth()` is the stable identifier you pass to future task runs to retrieve the user's access token.
130
-
</Note>
131
-
132
134
</Step>
133
135
</Steps>
134
136
@@ -242,7 +244,7 @@ export async function POST(req: Request) {
242
244
243
245
## Step 4: Set environment variables
244
246
245
-
Add the following to your `.env` file. Trigger.dev dev mode reads from `.env`, not `.env.local`, so keep task-related secrets there:
247
+
Add the following to your `.env.local` file:
246
248
247
249
```bash
248
250
NANGO_SECRET_KEY= # From Nango dashboard → Environment → Secret key
0 commit comments