Skip to content

Commit

Permalink
Merge branch 'main' of github.com:sidebase/nuxt-auth into feat/json-p…
Browse files Browse the repository at this point in the history
…ointer-extractor
  • Loading branch information
Valentin Hutter committed Feb 22, 2024
2 parents d596f39 + 0bc80f7 commit 24d165c
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sidebase/nuxt-auth",
"version": "0.6.4",
"version": "0.6.7",
"license": "MIT",
"type": "module",
"exports": {
Expand Down
2 changes: 1 addition & 1 deletion src/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ export default defineNuxtModule<ModuleOptions>({

// 7.2 Add a server-plugin to refresh the token on production-startup
if (selectedProvider === 'refresh') {
addPlugin(resolve('./runtime/server/plugins/refresh-token.server'))
addPlugin(resolve('./runtime/plugins/refresh-token.server'))
}

logger.success('`nuxt-auth` setup done')
Expand Down
2 changes: 1 addition & 1 deletion src/runtime/middleware/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export default defineNuxtRouteMiddleware((to) => {
}

if (authConfig.provider.type === 'authjs') {
const signInOptions: Parameters<typeof signIn>[1] = { error: 'SessionRequired', callbackUrl: determineCallbackUrl(authConfig, () => to.path) }
const signInOptions: Parameters<typeof signIn>[1] = { error: 'SessionRequired', callbackUrl: determineCallbackUrl(authConfig, () => to.fullPath) }
// @ts-ignore This is valid for a backend-type of `authjs`, where sign-in accepts a provider as a first argument
return signIn(undefined, signInOptions) as ReturnType<typeof navigateToAuthPages>
} else if (typeof metaAuth === 'object' && metaAuth.navigateUnauthenticatedTo) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { _fetch } from '../../utils/fetch'
import { jsonPointerGet, useTypedBackendConfig } from '../../helpers'
import { _fetch } from '../utils/fetch'
import { jsonPointerGet, useTypedBackendConfig } from '../helpers'
import { defineNuxtPlugin, useAuthState, useRuntimeConfig } from '#imports'
export default defineNuxtPlugin({
name: 'refresh-token-plugin',
Expand Down

0 comments on commit 24d165c

Please sign in to comment.