4 Commits

Author SHA1 Message Date
a77e689b38 Update plugin.ts 2023-06-22 21:32:28 +02:00
René Preuß
3ce7d64d50 Update CHANGELOG.md 2023-04-08 18:37:50 +02:00
René Preuß
6864194251 chore(release): v2.0.1 2023-04-08 18:33:28 +02:00
René Preuß
fc4abb27d5 Fix documentation 2023-04-08 18:33:00 +02:00
4 changed files with 18 additions and 5 deletions

View File

@@ -3,16 +3,28 @@
## v2.0.1 ## v2.0.1
## v1.0.6 Typo fixes in the GitHub/NPM repo
## v1.0.5 ## v2.0.0
Support for Authorization Code Grant with PKCE
## v1.0.5 - v1.0.6
Fix for CookieRef when using watch(...)
## v1.0.4 ## v1.0.4
Minor fixes
## v1.0.3 ## v1.0.3
Minor fixes
## v1.0.2 ## v1.0.2
Minor fixes
## v1.0.0 ## v1.0.0
Initial Release Initial Release

View File

@@ -82,7 +82,7 @@ export default defineNuxtConfig({
This will be your callback url (host is determined by `window.location.origin`): This will be your callback url (host is determined by `window.location.origin`):
- Callback: `http://localhost:3000/auth/login` - Callback: `http://localhost:3000/login`
That's it! You can now use @bitinflow/nuxt-oauth in your Nuxt app ✨ That's it! You can now use @bitinflow/nuxt-oauth in your Nuxt app ✨

View File

@@ -21,7 +21,8 @@
"dev": "nuxi dev playground", "dev": "nuxi dev playground",
"dev:build": "nuxi build playground", "dev:build": "nuxi build playground",
"dev:prepare": "nuxt-module-build --stub && nuxi prepare playground", "dev:prepare": "nuxt-module-build --stub && nuxi prepare playground",
"release": "npm run lint && npm run test && npm run prepack && changelogen --release && npm publish --access public && git push --follow-tags", "release": "npm run lint && npm run test && npm run prepack && changelogen --release && git push --follow-tags",
"push": "npm publish --access public",
"lint": "eslint .", "lint": "eslint .",
"test": "vitest run", "test": "vitest run",
"test:watch": "vitest watch" "test:watch": "vitest watch"

View File

@@ -74,7 +74,7 @@ export default defineNuxtPlugin(() => {
addRouteMiddleware('auth', async (to) => { addRouteMiddleware('auth', async (to) => {
const {user, authConfig, setBearerToken, setRefreshToken} = await useAuth() const {user, authConfig, setBearerToken, setRefreshToken} = await useAuth()
if (to.path === authConfig.redirect.callback) { if (to.path === authConfig.redirect.callback || to.path === authConfig.redirect.callback + '/') {
const queryParams = new URLSearchParams(to.query.toString()); const queryParams = new URLSearchParams(to.query.toString());
if (queryParams.has('error')) { if (queryParams.has('error')) {
return navigateTo(authConfig.redirect.login) return navigateTo(authConfig.redirect.login)