-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit b24ac0f
Showing
32 changed files
with
9,287 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
root = true | ||
|
||
[*] | ||
indent_size = 2 | ||
indent_style = space | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: ci | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- run: corepack enable | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
|
||
- name: Install dependencies | ||
run: npx nypm@latest i | ||
|
||
- name: Lint | ||
run: npm run lint | ||
|
||
test: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- run: corepack enable | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
|
||
- name: Install dependencies | ||
run: npx nypm@latest i | ||
|
||
- name: Playground prepare | ||
run: npm run dev:prepare | ||
|
||
- name: Test | ||
run: npm run test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
# Dependencies | ||
node_modules | ||
|
||
# Logs | ||
*.log* | ||
|
||
# Temp directories | ||
.temp | ||
.tmp | ||
.cache | ||
|
||
# Yarn | ||
**/.yarn/cache | ||
**/.yarn/*state* | ||
|
||
# Generated dirs | ||
dist | ||
|
||
# Nuxt | ||
.nuxt | ||
.output | ||
.data | ||
.vercel_build_output | ||
.build-* | ||
.netlify | ||
|
||
# Env | ||
.env | ||
|
||
# Testing | ||
reports | ||
coverage | ||
*.lcov | ||
.nyc_output | ||
|
||
# VSCode | ||
.vscode/* | ||
!.vscode/settings.json | ||
!.vscode/tasks.json | ||
!.vscode/launch.json | ||
!.vscode/extensions.json | ||
!.vscode/*.code-snippets | ||
|
||
# Intellij idea | ||
*.iml | ||
.idea | ||
|
||
# OSX | ||
.DS_Store | ||
.AppleDouble | ||
.LSOverride | ||
.AppleDB | ||
.AppleDesktop | ||
Network Trash Folder | ||
Temporary Items | ||
.apdisk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
shamefully-hoist=true | ||
strict-peer-dependencies=false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"eslint.experimental.useFlatConfig": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
# Changelog | ||
|
||
|
||
## v0.0.2 | ||
|
||
[compare changes](https://github.com/JoshDonnell/nuxt-auth-laravel/compare/v0.0.2...v0.0.2) | ||
|
||
### 🩹 Fixes | ||
|
||
- Version ([f79d7a5](https://github.com/JoshDonnell/nuxt-auth-laravel/commit/f79d7a5)) | ||
|
||
### ❤️ Contributors | ||
|
||
- Josh Donnell <[email protected]> | ||
|
||
## v0.0.2 | ||
|
||
|
||
### 🚀 Enhancements | ||
|
||
- Init commit ([a8801da](https://github.com/JoshDonnell/nuxt-auth-laravel/commit/a8801da)) | ||
|
||
### 🩹 Fixes | ||
|
||
- Update package name ([1311257](https://github.com/JoshDonnell/nuxt-auth-laravel/commit/1311257)) | ||
- Readme paths ([4679de1](https://github.com/JoshDonnell/nuxt-auth-laravel/commit/4679de1)) | ||
- Add export import for laravel auth ([ba0cd67](https://github.com/JoshDonnell/nuxt-auth-laravel/commit/ba0cd67)) | ||
- Type issue wth AsyncDataExecuteOptions ([357e4bc](https://github.com/JoshDonnell/nuxt-auth-laravel/commit/357e4bc)) | ||
|
||
### 🏡 Chore | ||
|
||
- **release:** V0.0.2 ([6276bde](https://github.com/JoshDonnell/nuxt-auth-laravel/commit/6276bde)) | ||
- **release:** V0.0.3 ([1c4878f](https://github.com/JoshDonnell/nuxt-auth-laravel/commit/1c4878f)) | ||
- **release:** V0.0.2 ([9144f1d](https://github.com/JoshDonnell/nuxt-auth-laravel/commit/9144f1d)) | ||
- **release:** V0.0.3 ([c92d034](https://github.com/JoshDonnell/nuxt-auth-laravel/commit/c92d034)) | ||
|
||
### ❤️ Contributors | ||
|
||
- Josh Donnell <[email protected]> | ||
|
||
## v0.0.3 | ||
|
||
[compare changes](https://github.com/JoshDonnell/nuxt-auth-laravel/compare/v0.0.3...v0.0.3) | ||
|
||
### 🩹 Fixes | ||
|
||
- Update package name ([1311257](https://github.com/JoshDonnell/nuxt-auth-laravel/commit/1311257)) | ||
- Readme paths ([4679de1](https://github.com/JoshDonnell/nuxt-auth-laravel/commit/4679de1)) | ||
- Add export import for laravel auth ([ba0cd67](https://github.com/JoshDonnell/nuxt-auth-laravel/commit/ba0cd67)) | ||
|
||
### 🏡 Chore | ||
|
||
- **release:** V0.0.2 ([9144f1d](https://github.com/JoshDonnell/nuxt-auth-laravel/commit/9144f1d)) | ||
|
||
### ❤️ Contributors | ||
|
||
- Josh Donnell <[email protected]> | ||
|
||
## v0.0.2 | ||
|
||
[compare changes](https://github.com/JoshDonnell/nuxt-auth-laravel/compare/v0.0.3...v0.0.2) | ||
|
||
### 🩹 Fixes | ||
|
||
- Update package name ([1311257](https://github.com/JoshDonnell/nuxt-auth-laravel/commit/1311257)) | ||
|
||
### ❤️ Contributors | ||
|
||
- Josh Donnell <[email protected]> | ||
|
||
## v0.0.3 | ||
|
||
[compare changes](https://github.com/your-org/my-module/compare/v0.0.2...v0.0.3) | ||
|
||
## v0.0.2 | ||
|
||
|
||
### 🚀 Enhancements | ||
|
||
- Init commit ([a8801da](https://github.com/your-org/my-module/commit/a8801da)) | ||
|
||
### ❤️ Contributors | ||
|
||
- Josh Donnell <[email protected]> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
<!-- | ||
Get your module up and running quickly. | ||
Find and replace all on all files (CMD+SHIFT+F): | ||
- Name: Nuxt Laravel Auth | ||
- Package name: nuxt-auth-laravel | ||
- Description: My new Nuxt module | ||
--> | ||
|
||
# Nuxt Laravel Auth | ||
|
||
[![npm version][npm-version-src]][npm-version-href] | ||
[![npm downloads][npm-downloads-src]][npm-downloads-href] | ||
[![License][license-src]][license-href] | ||
[![Nuxt][nuxt-src]][nuxt-href] | ||
|
||
A Nuxt module is used to manage authentication and data from Laravel. Features include full sanctum and passport support with support for separate auth and data apps which can be used when running a separate SSO application. | ||
|
||
- [✨ Release Notes](/CHANGELOG.md) | ||
<!-- - [🏀 Online playground](https://stackblitz.com/github/your-org/nuxt-auth-laravel?file=playground%2Fapp.vue) --> | ||
<!-- - [📖 Documentation](https://example.com) --> | ||
|
||
## Features | ||
|
||
<!-- Highlight some of the features your module provide here --> | ||
|
||
- Sanctum Auth support | ||
- Socialite Social Auth support | ||
- Supports seperate data and SSO apps | ||
- Included pagination handler | ||
- Laravel Error Handler | ||
- SSR support | ||
- Full Typescript support | ||
|
||
## Quick Setup | ||
|
||
1. Install the module to your Nuxt application with one command: | ||
|
||
```bash | ||
npx nuxi module add auth-laravel | ||
``` | ||
|
||
2.Add variables to .env or nuxt.config | ||
|
||
```bash | ||
.env | ||
LARAVEL_BASE_URL='http://localhost:8000' | ||
|
||
nuxt.config.ts | ||
laravel { | ||
baseUrl: 'http://localhost:8000' | ||
} | ||
``` | ||
|
||
That's it! You can now use Nuxt Laravel Auth in your Nuxt app ✨ | ||
|
||
See below for a full list of config setting that are acepted by Nuxt Laravel auth | ||
|
||
## Coming Soon | ||
|
||
A full feature guide and docs are coming very soon... | ||
|
||
## Contribution | ||
|
||
<details> | ||
<summary>Local development</summary> | ||
|
||
```bash | ||
# Install dependencies | ||
npm install | ||
|
||
# Generate type stubs | ||
npm run dev:prepare | ||
|
||
# Develop with the playground | ||
npm run dev | ||
|
||
# Build the playground | ||
npm run dev:build | ||
|
||
# Run ESLint | ||
npm run lint | ||
|
||
# Run Vitest | ||
npm run test | ||
npm run test:watch | ||
|
||
# Release new version | ||
npm run release | ||
``` | ||
|
||
</details> | ||
|
||
<!-- Badges --> | ||
|
||
[npm-version-src]: https://img.shields.io/npm/v/nuxt-auth-laravel/latest.svg?style=flat&colorA=020420&colorB=00DC82 | ||
[npm-version-href]: https://npmjs.com/package/nuxt-auth-laravel | ||
[npm-downloads-src]: https://img.shields.io/npm/dm/nuxt-auth-laravel.svg?style=flat&colorA=020420&colorB=00DC82 | ||
[npm-downloads-href]: https://npmjs.com/package/nuxt-auth-laravel | ||
[license-src]: https://img.shields.io/npm/l/nuxt-auth-laravel.svg?style=flat&colorA=020420&colorB=00DC82 | ||
[license-href]: https://npmjs.com/package/nuxt-auth-laravel | ||
[nuxt-src]: https://img.shields.io/badge/Nuxt-020420?logo=nuxt.js | ||
[nuxt-href]: https://nuxt.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// @ts-check | ||
import { createConfigForNuxt } from '@nuxt/eslint-config/flat' | ||
|
||
// Run `npx @eslint/config-inspector` to inspect the resolved config interactively | ||
export default createConfigForNuxt({ | ||
features: { | ||
// Rules for module authors | ||
tooling: true, | ||
// Rules for formatting | ||
stylistic: false, | ||
}, | ||
dirs: { | ||
src: ['./playground'], | ||
}, | ||
}).append( | ||
// your custom flat config here... | ||
{ | ||
rules: { | ||
'vue/html-self-closing': 'off', | ||
'vue/multi-word-component-names': 0, | ||
}, | ||
} | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
{ | ||
"name": "nuxt-auth-laravel", | ||
"version": "0.0.1", | ||
"description": "A Nuxt module is used to manage authentication and data from Laravel. Features include full sanctum and passport support with support for separate auth and data apps which can be used when running a separate SSO application.", | ||
"repository": "JoshDonnell/nuxt-auth-laravel", | ||
"license": "MIT", | ||
"type": "module", | ||
"exports": { | ||
".": { | ||
"types": "./dist/types.d.ts", | ||
"import": "./dist/module.mjs", | ||
"require": "./dist/module.cjs" | ||
} | ||
}, | ||
"main": "./dist/module.cjs", | ||
"types": "./dist/types.d.ts", | ||
"files": [ | ||
"dist" | ||
], | ||
"scripts": { | ||
"prepack": "nuxt-module-build build", | ||
"dev": "nuxi dev playground", | ||
"dev:build": "nuxi build playground", | ||
"dev:prepare": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxi prepare playground", | ||
"release": "npm run lint && npm run test && npm run prepack && changelogen --release && npm publish && git push --follow-tags", | ||
"lint": "eslint .", | ||
"test": "vitest run", | ||
"test:watch": "vitest watch", | ||
"test:types": "vue-tsc --noEmit && cd playground && vue-tsc --noEmit" | ||
}, | ||
"dependencies": { | ||
"@nuxt/kit": "^3.12.4", | ||
"defu": "^6.1.4" | ||
}, | ||
"devDependencies": { | ||
"@nuxt/devtools": "^1.3.9", | ||
"@nuxt/eslint-config": "^0.4.0", | ||
"@nuxt/module-builder": "^0.8.1", | ||
"@nuxt/schema": "^3.12.4", | ||
"@nuxt/test-utils": "^3.14.0", | ||
"@types/node": "^22.0.2", | ||
"changelogen": "^0.5.5", | ||
"eslint": "^9.8.0", | ||
"nuxt": "^3.12.4", | ||
"typescript": "latest", | ||
"vitest": "^2.0.5", | ||
"vue-tsc": "^2.0.29" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<template> | ||
<div> | ||
<NuxtPage /> | ||
</div> | ||
</template> |
Oops, something went wrong.