diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 007cf39..b289c45 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -26,6 +26,9 @@ jobs: - workingDirectory: ./examples/react-spa projectName: cerberauth-react-spa-oidc directory: ./dist + - workingDirectory: ./examples/vue-spa + projectName: cerberauth-vue-spa-oidc + directory: ./dist - workingDirectory: ./examples/angular-spa projectName: cerberauth-angular-spa-oidc directory: ./dist/angular-spa/browser diff --git a/examples/nextjs-app/thumbnail.png b/examples/nextjs-app/thumbnail.png new file mode 100644 index 0000000..b258de9 Binary files /dev/null and b/examples/nextjs-app/thumbnail.png differ diff --git a/examples/vue-spa/.env b/examples/vue-spa/.env new file mode 100644 index 0000000..54ff335 --- /dev/null +++ b/examples/vue-spa/.env @@ -0,0 +1,2 @@ +VITE_OIDC_ISSUER="https://testid.cerberauth.com" +VITE_OIDC_CLIENT_ID="" diff --git a/examples/vue-spa/Dockerfile b/examples/vue-spa/Dockerfile new file mode 100644 index 0000000..7333d48 --- /dev/null +++ b/examples/vue-spa/Dockerfile @@ -0,0 +1,30 @@ +FROM node:lts as development + +WORKDIR /app + +COPY package*.json ./ +RUN npm ci + +COPY . . + +ENV CI=true +ENV PORT=3000 + +CMD [ "npm", "start" ] + +FROM development as builder + +RUN npm run build + +FROM nginx:alpine + +# Copy config nginx +COPY --from=builder /app/.nginx/nginx.conf /etc/nginx/conf.d/default.conf + +WORKDIR /usr/share/nginx/html + +# Remove default nginx static assets +RUN rm -rf ./* + +# Copy static assets from builder stage +COPY --from=builder /app/dist . diff --git a/examples/vue-spa/package-lock.json b/examples/vue-spa/package-lock.json index ff064ad..91eed4e 100644 --- a/examples/vue-spa/package-lock.json +++ b/examples/vue-spa/package-lock.json @@ -8,8 +8,8 @@ "name": "vue-spa", "version": "0.0.0", "dependencies": { + "oauth4webapi": "^3.0.0", "vue": "^3.4.29", - "vue-auth3": "^1.0.10", "vue-router": "^4.3.3" }, "devDependencies": { @@ -2899,6 +2899,14 @@ "url": "https://github.com/fb55/nth-check?sponsor=1" } }, + "node_modules/oauth4webapi": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/oauth4webapi/-/oauth4webapi-3.0.0.tgz", + "integrity": "sha512-Rw9SxQYuQX9J41VgM4rVNGtm1ng0Qcd8ndv7JmhmwqQ3hHBokX+WjV379IJhKk7bVPHefgvrDgHoO/rB2dY7YA==", + "funding": { + "url": "https://github.com/sponsors/panva" + } + }, "node_modules/object-assign": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", @@ -3856,7 +3864,7 @@ "version": "5.4.5", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.5.tgz", "integrity": "sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==", - "devOptional": true, + "dev": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -4001,11 +4009,6 @@ } } }, - "node_modules/vue-auth3": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/vue-auth3/-/vue-auth3-1.0.10.tgz", - "integrity": "sha512-tI3JhwiUIWtnMwKyzcKsqJkPAQjcEH8leCju5bu1orkmHgYIU0+sFiHrCc3nJsF9ILn19rb6JOeviAQjArtvLg==" - }, "node_modules/vue-eslint-parser": { "version": "9.4.3", "resolved": "https://registry.npmjs.org/vue-eslint-parser/-/vue-eslint-parser-9.4.3.tgz", diff --git a/examples/vue-spa/package.json b/examples/vue-spa/package.json index 4f18cd8..232f6e5 100644 --- a/examples/vue-spa/package.json +++ b/examples/vue-spa/package.json @@ -6,6 +6,7 @@ "scripts": { "dev": "vite", "build": "run-p type-check \"build-only {@}\" --", + "pages:build": "vite build --mode production", "preview": "vite preview", "build-only": "vite build", "type-check": "vue-tsc --build --force", @@ -13,8 +14,8 @@ "format": "prettier --write src/" }, "dependencies": { + "oauth4webapi": "^3.0.0", "vue": "^3.4.29", - "vue-auth3": "^1.0.10", "vue-router": "^4.3.3" }, "devDependencies": { diff --git a/examples/vue-spa/src/App.vue b/examples/vue-spa/src/App.vue index a78fb6f..baeba78 100644 --- a/examples/vue-spa/src/App.vue +++ b/examples/vue-spa/src/App.vue @@ -1,5 +1,17 @@