Integrating with Nuxt.js
Using @authaction/server-sdk
Section titled “Using @authaction/server-sdk”npm install @authaction/server-sdkimport { createNuxtHandlers } from "@authaction/server-sdk/nuxt";import { defineEventHandler, getCookie, setCookie, deleteCookie, getQuery, sendRedirect, createError,} from "h3";
const { handler } = createNuxtHandlers( { domain: process.env.AUTHACTION_DOMAIN, clientId: process.env.AUTHACTION_CLIENT_ID, redirectUri: process.env.AUTHACTION_REDIRECT_URI, sessionSecret: process.env.SESSION_SECRET, }, { defineEventHandler, getCookie, setCookie, deleteCookie, getQuery, sendRedirect, createError });export default handler;// Handles: /api/auth/login, /api/auth/callback, /api/auth/logout, /api/auth/sessionFull SDK reference: github.com/authaction/authaction-server-sdk