1.5.2 • Published 9 months ago

@solid-mediakit/authpc-plugin v1.5.2

Weekly downloads
-
License
-
Repository
-
Last release
9 months ago

@solid-mediakit/authpc-plugin

A Vite plugin for AuthPC

Installation

pnpm install @solid-mediakit/authpc-plugin

Add to app.config.ts

Wrap your entire config with the withAuthPC method for typesafety:

import { withAuthPC } from '@solid-mediakit/authpc-plugin'

const config = withAuthPC(
  {
    ssr: true,
  },
  {
    auth: 'authjs',
    authCfg: {
      source: '~/server/auth', // where your AuthJS config is located
      configName: 'authOpts', // The variable name of your AuthJS Config
      protectedMessage: 'You need to sign in first',
    },
  },
)

declare module '@solid-mediakit/authpc' {
  interface Settings {
    config: typeof config
  }
}

export default config
1.5.2

9 months ago

1.5.1

9 months ago

1.5.0

9 months ago

1.4.0

9 months ago

1.3.4

9 months ago