@lpshanley/oidc-start-react 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -8,10 +8,10 @@ For multi-replica deployment, see the [production guide](https://github.com/lpsh
8
8
 
9
9
  ## 1. Install and configure the server
10
10
 
11
- Use Node.js 22.12 or newer. Your app supplies `@tanstack/react-start@^1.169.2` and `@tanstack/react-router@^1.170.44`. Install both OIDC packages because your app imports the core directly.
11
+ Use Node.js 22.12 or newer. Your app supplies `@tanstack/react-start@^1.169.2` and `@tanstack/react-router@^1.170.44`. Install the React adapter. It brings in the OIDC core as a dependency.
12
12
 
13
13
  ```sh
14
- npm install @lpshanley/oidc-start-react @lpshanley/oidc-start-core
14
+ npm install @lpshanley/oidc-start-react
15
15
  ```
16
16
 
17
17
  Register a confidential web client with your OIDC provider. If your app runs at `http://localhost:5173`, register these exact URLs. Use your public HTTPS origin in production.
@@ -32,7 +32,7 @@ OIDC_CLIENT_SECRET=your-client-secret
32
32
  SESSION_SECRET=
33
33
  ```
34
34
 
35
- For local development, copy the example’s `auth.server.ts` into `src/auth.server.ts`. It exports an `auth` instance configured with `callbackPath: '/callback'` and `postLogoutPath: '/'`. The example admits any authenticated user and keeps revocations in memory. For deployment, set `allowSession` to your access policy and use a durable revocation store shared by all instances. [Copy auth.server.ts](https://github.com/lpshanley/oidc-start/blob/main/examples/tanstack-start/src/auth.server.ts) · [Core configuration and storage](https://www.npmjs.com/package/@lpshanley/oidc-start-core)
35
+ Import `createOidcCore` and the `SessionRevocations` type from `@lpshanley/oidc-start-react/server` in your server module. For local development, copy the example’s `auth.server.ts` into `src/auth.server.ts`. It exports an `auth` instance configured with `callbackPath: '/callback'` and `postLogoutPath: '/'`. The example admits any authenticated user and keeps revocations in memory. For deployment, set `allowSession` to your access policy and use a durable revocation store shared by all instances. [Copy auth.server.ts](https://github.com/lpshanley/oidc-start/blob/main/examples/tanstack-start/src/auth.server.ts) · [Core configuration and storage](https://www.npmjs.com/package/@lpshanley/oidc-start-core)
36
36
 
37
37
  ## 2. Register the request middleware
38
38
 
@@ -69,7 +69,7 @@ export const Route = createFileRoute('/callback')({
69
69
  In `src/routes/index.tsx`, call `getAuth()` from the loader. It returns `{ user }`, with `user: null` for a signed-out visitor. Bind `signOut` with `useServerFn` so TanStack follows the redirect to the provider when the user clicks the button.
70
70
 
71
71
  ```tsx
72
- import { displayName } from '@lpshanley/oidc-start-core/models'
72
+ import { displayName } from '@lpshanley/oidc-start-react'
73
73
  import { getAuth, getSignInUrl, signOut } from '@lpshanley/oidc-start-react/functions'
74
74
  import { createFileRoute } from '@tanstack/react-router'
75
75
  import { useServerFn } from '@tanstack/react-start'
package/dist/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ export * from "@lpshanley/oidc-start-core/models";
1
2
  export type { OidcCallContext, OidcErrorEvent, OidcMiddlewareOptions, } from "@lpshanley/oidc-start-core/config";
2
3
  export { type OidcMiddlewareSetup, oidcMiddleware } from "./middleware.js";
3
4
  export { type CallbackRouteOptions, handleBackchannelLogoutRoute, handleCallbackRoute, handleSignInRoute, handleSignOutRoute, } from "./routes.js";
package/dist/index.js CHANGED
@@ -1,2 +1,3 @@
1
+ export * from "@lpshanley/oidc-start-core/models";
1
2
  export { oidcMiddleware } from "./middleware.js";
2
3
  export { handleBackchannelLogoutRoute, handleCallbackRoute, handleSignInRoute, handleSignOutRoute, } from "./routes.js";
package/dist/server.d.ts CHANGED
@@ -1 +1,2 @@
1
+ export * from "@lpshanley/oidc-start-core";
1
2
  export { getOidcContext, type OidcContext } from "./context.js";
package/dist/server.js CHANGED
@@ -1 +1,2 @@
1
+ export * from "@lpshanley/oidc-start-core";
1
2
  export { getOidcContext } from "./context.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lpshanley/oidc-start-react",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -36,7 +36,7 @@
36
36
  "node": ">=22.12.0"
37
37
  },
38
38
  "dependencies": {
39
- "@lpshanley/oidc-start-core": "0.1.0",
39
+ "@lpshanley/oidc-start-core": "0.2.0",
40
40
  "zod": "4.6.7"
41
41
  },
42
42
  "devDependencies": {