diff --git a/README.md b/README.md index 2a94c9d..7d6a1c5 100644 --- a/README.md +++ b/README.md @@ -50,8 +50,8 @@ export default defineNuxtConfig({ ssr: false, // or routeRules: { - '/account/**': {ssr: false}, - '/auth/**': {ssr: false} + '/dashboard/**': {ssr: false}, + '/whatever/**': {ssr: false} }, // using code response type (default) diff --git a/UPGRADE.md b/UPGRADE.md index 4fe6933..5bb7396 100644 --- a/UPGRADE.md +++ b/UPGRADE.md @@ -11,16 +11,3 @@ is [not recommended](https://datatracker.ietf.org/doc/html/draft-ietf-oauth-secu want to use the `token` response type, you need to set it explicitly with `responseType: 'token'` in the `oauth` configuration. Otherwise, you will use Authorization Code Grant with PKCE by default. -### Refactor default `login` and `callback` routes to `/auth/login` - -We nested all authentication related routes under `/auth` prefix, so it aligned with our documentation and -provided a better default configuration. If you want to use the old routes, you need to update your `oauth` -configuration: - -``` -endpoints: { - login: '/login', - callback: '/login', -}, -``` - diff --git a/playground/nuxt.config.ts b/playground/nuxt.config.ts index cb73035..ca194ba 100644 --- a/playground/nuxt.config.ts +++ b/playground/nuxt.config.ts @@ -4,6 +4,9 @@ export default defineNuxtConfig({ ssr: false, oauth: { + redirect: { + home: '/home' + }, clientId: '98e1cb74-125a-4d60-b686-02c2f0c87521', scope: ['user:read'] }, diff --git a/playground/pages/home.vue b/playground/pages/home.vue index 84dbc43..6632af8 100644 --- a/playground/pages/home.vue +++ b/playground/pages/home.vue @@ -9,7 +9,7 @@ definePageMeta({ const { $api } = useNuxtApp() -$api.get('users/@me') +$api.get('user') .then((response: any) => { console.log(response.data) }) @@ -20,7 +20,7 @@ $api.get('users/@me')