Skip to content

feat: add createSession(event, userId) server utility#300

Merged
onmax merged 3 commits intonuxt-modules:mainfrom
onmax:issue-297-create-session
Mar 26, 2026
Merged

feat: add createSession(event, userId) server utility#300
onmax merged 3 commits intonuxt-modules:mainfrom
onmax:issue-297-create-session

Conversation

@onmax
Copy link
Copy Markdown
Collaborator

@onmax onmax commented Mar 25, 2026

Closes #297

Summary

  • add an auto-imported createSession(event, userId) server helper
  • delegate to Better Auth session creation with dontRememberMe disabled
  • document the helper as an escape hatch for custom server-side auth flows

Validation

  • pnpm vitest run test/get-request-session.test.ts
  • fresh /tmp/nuxt-better-auth-297-repro app: /api/me returns 401, /api/custom-login returns 200, then /api/me returns 200 after the route creates a session through createSession

@vercel
Copy link
Copy Markdown
Contributor

vercel bot commented Mar 25, 2026

@onmax is attempting to deploy a commit to the maximogarciamartinez's projects Team on Vercel.

A member of the Team first needs to authorize it.

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Mar 25, 2026

Open in StackBlitz

npm i https://pkg.pr.new/@onmax/nuxt-better-auth@300

commit: 5dc622e

@onmax onmax force-pushed the issue-297-create-session branch from 5a1141d to df97ae3 Compare March 26, 2026 06:10
@onmax onmax merged commit 0943dad into nuxt-modules:main Mar 26, 2026
3 of 4 checks passed
@onmax onmax deleted the issue-297-create-session branch March 26, 2026 09:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: add createSession(event, userId) server utility

1 participant