Files
Peter EvansandJeremie Pardou e4b9a2615b feat: add a shared base for integrations that connect an account through OAuth (#6810)
* feat: add a shared base for integrations that connect an account through OAuth

* fix: keep OAuth account scopes current and bound provider answers

* fix: share parent registration between form APIs

* fix: preserve refreshed OAuth tokens when actions fail

* refactor: use absolute imports for parent OAuth modules

* refactor: decouple OAuth cleanup from application publication models

* refactor: use common import hooks for OAuth connections

* fix: keep OAuth account integrations out of the workspace

---------

Co-authored-by: Jeremie Pardou <571533+jrmi@users.noreply.github.com>
2026-11-30 08:55:52 +00:00

35 lines
692 B
JavaScript

import {
defineNuxtModule,
addPlugin,
createResolver,
extendPages,
} from 'nuxt/kit'
import { routes as oauthAccountRoutes } from './oauthAccount/routes'
import { locales } from '../../config/locales.js'
export default defineNuxtModule({
meta: {
name: 'integrations-module',
},
setup(options, nuxt) {
const { resolve } = createResolver(import.meta.url)
// Register main plugin
addPlugin({
src: resolve('./plugin.js'),
})
extendPages((pages) => {
pages.push(...oauthAccountRoutes)
})
nuxt.hook('i18n:registerModule', (register) => {
register({
langDir: resolve('./locales'),
locales,
})
})
},
})