Skip to content

Commit f2f557f

Browse files
committed
chore: use SESSION_SECRET instead
1 parent 6d36c0f commit f2f557f

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

.env.example

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# Password for server auth-utils (minimum 32 characters)
2-
SESSION_PASSWORD=
1+
# Private key used to encrypt session cookie (minimum 32 characters)
2+
SESSION_SECRET=
33
# GitHub OAuth client ID
44
GITHUB_OAUTH_CLIENT_ID=
55
# GitHub OAuth client secret

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ npm create nuxt@latest -- -t github:nuxt-ui-templates/chat-vue
3333

3434
## Deploy your own
3535

36-
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-name=chat-vue&repository-url=https%3A%2F%2Fgithub.com%2Fnuxt-ui-templates%2Fchat-vue&env=SESSION_PASSWORD,GITHUB_OAUTH_CLIENT_ID,GITHUB_OAUTH_CLIENT_SECRET&products=%5B%7B%22type%22%3A%22integration%22%2C%22group%22%3A%22postgres%22%7D%5D&demo-image=https%3A%2F%2Fui.nuxt.com%2Fassets%2Ftemplates%2Fnuxt%2Fchat-dark.png&demo-url=https%3A%2F%2Fchat-vue-template.nuxt.dev%2F&demo-title=Vue%20Chat%20Template&demo-description=An%20AI%20chatbot%20template%20to%20build%20your%20own%20chatbot%20powered%20by%20Vue%20MDC%20and%20Vercel%20AI%20SDK.)
36+
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-name=chat-vue&repository-url=https%3A%2F%2Fgithub.com%2Fnuxt-ui-templates%2Fchat-vue&env=SESSION_SECRET,GITHUB_OAUTH_CLIENT_ID,GITHUB_OAUTH_CLIENT_SECRET&products=%5B%7B%22type%22%3A%22integration%22%2C%22group%22%3A%22postgres%22%7D%5D&demo-image=https%3A%2F%2Fui.nuxt.com%2Fassets%2Ftemplates%2Fnuxt%2Fchat-dark.png&demo-url=https%3A%2F%2Fchat-vue-template.nuxt.dev%2F&demo-title=Vue%20Chat%20Template&demo-description=An%20AI%20chatbot%20template%20to%20build%20your%20own%20chatbot%20powered%20by%20Vue%20MDC%20and%20Vercel%20AI%20SDK.)
3737

3838
## Setup
3939

@@ -56,8 +56,8 @@ GITHUB_OAUTH_CLIENT_SECRET=<your-github-oauth-app-client-secret>
5656
# AI Configuration via Vercel AI Gateway (unified API for all providers)
5757
AI_GATEWAY_API_KEY=<your-vercel-ai-gateway-api-key>
5858
59-
# Password for nuxt-auth-utils (minimum 32 characters)
60-
SESSION_PASSWORD=<your-password>
59+
# Private key used to encrypt session cookie (minimum 32 characters)
60+
SESSION_SECRET=<your-secret-of-32-characters>
6161
```
6262

6363
> [!TIP]

server/utils/session.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ export interface UserSession extends Session {
1010
}
1111

1212
export function useUserSession (event: HTTPEvent) {
13-
if (!process.env.SESSION_PASSWORD) {
14-
throw new Error('SESSION_PASSWORD environment variable is not set')
13+
if (!process.env.SESSION_SECRET) {
14+
throw new Error('SESSION_SECRET environment variable is not set')
1515
}
1616
return useSession<UserSession>(event, {
17-
password: process.env.SESSION_PASSWORD
17+
password: process.env.SESSION_SECRET
1818
})
1919
}

0 commit comments

Comments
 (0)