@eventuras/fides-auth-next 0.8.0 → 1.0.0-beta.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
@@ -1,116 +1,185 @@
1
1
  # @eventuras/fides-auth-next
2
2
 
3
- Next.js authentication with XState Store state management.
3
+ Next.js bindings for `@eventuras/fides-auth`. `createFidesAuth` here is the core
4
+ instance bound to `cookies()` from `next/headers`. It caches session reads per
5
+ render with React's `cache()`, and adds a refresh for `proxy.ts`.
4
6
 
5
7
  ## Installation
6
8
 
7
9
  ```bash
8
- pnpm add @eventuras/fides-auth-next @xstate/store
10
+ pnpm add @eventuras/fides-auth @eventuras/fides-auth-next
9
11
  ```
10
12
 
11
- ## Quick Start
13
+ `@eventuras/fides-auth`, `next` and `react` are peer dependencies, so the app
14
+ has one copy of core. Needs Node 22.
12
15
 
13
- ```typescript
14
- // 1. Create store
15
- import {
16
- createAuthStore,
17
- createAuthStoreHooks,
18
- } from "@eventuras/fides-auth-next/store";
19
-
20
- export const authStore = createAuthStore({
21
- checkAuthStatus: getAuthStatus,
22
- config: { adminRole: "Admin" },
23
- });
24
-
25
- export const { useAuthStore, useAuthActions } = createAuthStoreHooks(authStore);
26
-
27
- // 2. Initialize in app
28
- useEffect(() => {
29
- initializeAuth(authStore, getAuthStatus);
30
- return startSessionMonitor(authStore, getAuthStatus, { interval: 30_000 });
31
- }, []);
32
-
33
- // 3. Use in components
34
- const { isAuthenticated, user, isAdmin } = useAuthStore();
35
- const { logout } = useAuthActions();
36
- ```
37
-
38
- ## Features
16
+ ## Setup
39
17
 
40
- - **XState Store**: Simple auth state management with automatic session monitoring
41
- - **Cookie Helpers**: Server-side cookie operations
42
- - **Session Management**: High-level session functions
43
- - **OAuth**: Complete OAuth flow with PKCE and RP-initiated logout
44
- - **TypeScript**: Full type safety
45
-
46
- ## Server Setup
47
-
48
- Create one instance and import it where you need it. The library never reads
49
- the environment, so pass the secret in:
18
+ Create one instance in a module of its own and import it where you need it:
50
19
 
51
20
  ```typescript
52
21
  // lib/auth.ts
53
22
  import { createFidesAuth } from "@eventuras/fides-auth-next";
54
23
 
55
24
  export const auth = createFidesAuth({
25
+ oauthConfig: {
26
+ issuer: process.env.OIDC_ISSUER!,
27
+ clientId: process.env.OIDC_CLIENT_ID!,
28
+ clientSecret: process.env.OIDC_CLIENT_SECRET!,
29
+ redirectUri: "https://app.example.com/api/auth/callback",
30
+ scope: "openid profile email offline_access",
31
+ },
56
32
  secret: process.env.SESSION_SECRET!, // openssl rand -hex 32
57
- oauthConfig,
58
33
  });
59
34
  ```
60
35
 
61
- Route handlers:
36
+ The library never reads the environment, so pass the values in. It checks the
37
+ secret and the redirect URI on first use, so `next build` can import the module
38
+ without them. A client with `clientAuth: 'none'` throws at once: the server side
39
+ of an app is a confidential client.
40
+
41
+ | Option | Default | |
42
+ |---|---|---|
43
+ | `sessionStore` | none | Keeps sessions in a store, with only a handle in the cookie. See below. |
44
+ | `sessionDurationDays` | 30 | How long a session lasts from login. Refreshes don't extend it. |
45
+ | `applicationUrl` | the redirect URI's origin | The app's public origin, for the same-origin check and redirects. |
46
+ | `mapSession` | none | Changes the session built at login, e.g. to add `data`. |
47
+ | `rolesClaim` | `'roles'` | The ID token claim that holds the user's roles. |
48
+ | `validateReturnTo` | a path on this origin | Turns `?returnTo=` into a safe path, or null. |
49
+ | `defaultRedirectPath` | `'/'` | Where a login without a return path lands. |
50
+ | `postLogoutRedirectUri` | `applicationUrl` | Where the provider sends the user after logout. |
51
+ | `rateLimit` | none | `(request) => boolean`. The handlers answer 429 when it returns false. |
52
+ | `logger` | JSON lines on the console | A `FidesLoggerFactory`. |
53
+ | `onSessionEvent` | none | Gets every session event. See [session events](../fides-auth/docs/session-events.md). |
54
+
55
+ ## Route handlers
62
56
 
63
57
  ```typescript
64
58
  // app/api/auth/login/route.ts
65
59
  export const GET = (request: Request) => auth.handleOidcLogin(request);
66
60
 
67
- // app/api/auth/callback/oidc/route.ts
68
- export const GET = (request: Request) =>
69
- auth.handleOidcCallback(request, { applicationUrl: "https://app.example.com" });
61
+ // app/api/auth/callback/route.ts
62
+ export const GET = (request: Request) => auth.handleOidcCallback(request);
70
63
 
71
64
  // app/api/auth/logout/route.ts
72
- export const POST = (request: Request) =>
73
- auth.handleOidcLogout(request, { postLogoutRedirectUri: "https://app.example.com/" });
65
+ export const POST = (request: Request) => auth.handleOidcLogout(request);
66
+
67
+ // app/api/auth/session/route.ts
68
+ export const GET = (request: Request) => auth.handleSessionInfo(request);
69
+ ```
70
+
71
+ The callback's path must be the redirect URI's. Login takes `?returnTo=/path`
72
+ and lands there with `?login=success`.
73
+
74
+ Logout answers only a `POST` from the app's own pages, so a form does it:
74
75
 
75
- // app/api/auth/heartbeat/route.ts
76
- export const POST = (request: Request) => auth.handleHeartbeat(request);
76
+ ```tsx
77
+ <form method="post" action="/api/auth/logout">
78
+ <button>Log out</button>
79
+ </form>
77
80
  ```
78
81
 
79
- Server components, server actions and route handlers:
82
+ `handleSessionInfo` answers whether there is a session, and whose. It never
83
+ refreshes and never returns tokens. `handleHeartbeat` is there for apps that tie
84
+ refreshes to user activity; it too answers only a same-origin `POST`.
85
+
86
+ ## Reading the session
87
+
88
+ In Server Components, Server Actions and Route Handlers:
80
89
 
81
90
  ```typescript
82
- const session = await auth.getCurrentSession();
83
- const { reason } = await auth.tryGetCurrentSession();
84
- const refreshed = await auth.tryRefreshCurrentSession();
85
- await auth.clearCurrentSession();
91
+ const session = await auth.readSession(); // Session | null
92
+ const { session, reason } = await auth.tryReadSession();
93
+ const tokens = await auth.getTokens(); // Tokens | null
86
94
  ```
87
95
 
88
- API calls with the access token. On a 401, `authorizedFetch` refreshes the
89
- session and retries once; parallel calls in one request share the refresh. The
90
- refresh writes cookies, so it works only in Server Actions and Route Handlers.
91
- In a Server Component pass `refresh: false`, and a 401 is an `http_error`:
96
+ `readSession` and `tryReadSession` share one read per render. A `Session` has
97
+ `user`, `scopes`, `data`, `idp`, `correlationId`, `createdAt` and `expiresAt`.
98
+ The tokens aren't on it: `getTokens` returns them, and `authorizedFetch` uses
99
+ them.
100
+
101
+ `createSession`, `updateSession`, `refreshSession` and `clearSession` write
102
+ cookies, so they work in Server Actions and Route Handlers.
103
+
104
+ ## Keeping the session fresh
105
+
106
+ Nothing refreshes unless you ask, with `refreshSession` or `refreshInProxy`.
107
+ Reads and `authorizedFetch` never do, so they are safe anywhere.
108
+
109
+ A Server Component can't set cookies, so it can't save a refreshed session.
110
+ Refresh in the proxy instead, before the page renders:
92
111
 
93
112
  ```typescript
94
- const api = { allowedBase: "https://api.example.com/v1/" };
113
+ // proxy.ts
114
+ import type { NextRequest } from "next/server";
115
+ import { auth } from "@/lib/auth";
116
+
117
+ export function proxy(request: NextRequest) {
118
+ return auth.refreshInProxy(request);
119
+ }
120
+
121
+ export const config = {
122
+ matcher: ["/((?!api/auth|_next/static|_next/image|favicon.ico).*)"],
123
+ };
124
+ ```
125
+
126
+ `refreshInProxy` refreshes a session whose access token expires within 60
127
+ seconds; `ifExpiresWithin` changes that. It sets the new cookies on the
128
+ response and on the request it forwards, so the page renders with the
129
+ refreshed session. A request without a session cookie passes straight through,
130
+ and a failed refresh leaves the session as it is.
131
+
132
+ To send users without a session to the login, check the cookie first:
95
133
 
96
- // Server Action or Route Handler
97
- const { data } = await auth.authorizedFetch(session, "users/me", {
98
- ...api,
134
+ ```typescript
135
+ import { NextResponse, type NextRequest } from "next/server";
136
+
137
+ export function proxy(request: NextRequest) {
138
+ if (!request.cookies.has(auth.cookieNames.session)) {
139
+ return NextResponse.redirect(new URL("/api/auth/login", request.url));
140
+ }
141
+ return auth.refreshInProxy(request);
142
+ }
143
+ ```
144
+
145
+ In a Server Action or Route Handler, refresh first if the access token is about
146
+ to expire. Without `ifExpiresWithin`, `refreshSession` refreshes at once:
147
+
148
+ ```typescript
149
+ await auth.refreshSession({ ifExpiresWithin: 60 });
150
+ ```
151
+
152
+ The result says whether it `refreshed`. On failure it gives a `reason`, and
153
+ `cause: "invalid_grant"` means the user must log in again.
154
+
155
+ ## Calling APIs
156
+
157
+ `authorizedFetch` sends the access token to URLs under `allowedBase`. It never
158
+ refreshes, so it works the same in a Server Component, a Server Action and a
159
+ Route Handler:
160
+
161
+ ```typescript
162
+ const { data } = await auth.authorizedFetch("users/me", {
163
+ allowedBase: "https://api.example.com/v1/",
99
164
  parse: (response) => response.json(),
100
165
  });
101
-
102
- // Server Component
103
- const { data } = await auth.authorizedFetch(session, "users/me", { ...api, refresh: false });
104
166
  ```
105
167
 
106
- The handlers are also exported on their own (`@eventuras/fides-auth-next/oidc-login`
107
- and so on). Those take `oauthConfig` and `secret` in their config.
168
+ A 401 throws an `AuthorizedFetchError` with the reason `http_error`. Pages get
169
+ fresh tokens from `refreshInProxy`; in a Server Action or Route Handler, call
170
+ `refreshSession({ ifExpiresWithin: 60 })` before the request.
171
+
172
+ The error says why, where it can. `accessTokenExpired` is true when the token
173
+ had passed its expiry by the server's clock. `bearerError` is the API's own
174
+ reason from its `WWW-Authenticate` header: `invalid_token` means a refresh may
175
+ help, and `insufficient_scope` means it won't.
108
176
 
109
177
  ## Server sessions
110
178
 
111
- By default the session lives in encrypted cookies. Pass a `sessionStore` to keep
112
- it on the server instead. The browser then holds only a random handle, in the
113
- `session_ref` cookie:
179
+ By default the session lives in the `__Host-session` cookie, in up to three
180
+ chunks. Pass a `sessionStore` to keep it on the server. The browser then holds
181
+ only a random handle, and logout deletes the record.
182
+ [Cookie or store](../fides-auth/README.md#cookie-or-store) compares the two.
114
183
 
115
184
  ```typescript
116
185
  // lib/auth.ts
@@ -122,57 +191,28 @@ const sessionStore: SessionStore = {
122
191
  delete: (key) => db.sessions.remove(key),
123
192
  };
124
193
 
125
- export const auth = createFidesAuth({
126
- secret: process.env.SESSION_SECRET!,
127
- oauthConfig,
128
- sessionStore,
129
- });
194
+ export const auth = createFidesAuth({ oauthConfig, secret, sessionStore });
130
195
  ```
131
196
 
132
- Every handler and helper on `auth` then uses the store, and logout deletes the
133
- record. `secret` is still required: it encrypts the records and seals the login
134
- transaction.
135
-
136
197
  Use a store that every instance shares, such as a database, and add `withLock`
137
198
  when you run more than one instance. `createMemorySessionStore()` from
138
199
  `@eventuras/fides-auth/server` is for tests. See
139
200
  [Server-side sessions](../fides-auth/docs/server-sessions.md) for the store
140
- contract and an adapter example.
201
+ contract.
141
202
 
142
203
  ## Rate limiting
143
204
 
144
- The route handlers use a default limiter. It is deprecated, together with
145
- `globalGETRateLimit`, `globalPOSTRateLimit` and `TokenBucket`: it keys on the raw
146
- `X-Forwarded-For` header, which a client can send itself, and lets requests
147
- without the header through.
148
-
149
- For a limiter of your own, add `@eventuras/fides-auth` and call its handler from
150
- `/server` with the Next cookie store and a `rateLimit` callback. Key it on
151
- something the app trusts, such as the client address your own proxy sets. The
152
- handler answers 429 when the callback returns `false`:
205
+ There is no default limiter. Pass `rateLimit`, keyed on something the app
206
+ trusts, such as the client address your own proxy sets:
153
207
 
154
208
  ```typescript
155
- // app/api/auth/login/route.ts
156
- import { handleOidcLogin } from "@eventuras/fides-auth/server";
157
- import { nextCookieStore } from "@eventuras/fides-auth-next";
158
-
159
- export async function GET(request: Request) {
160
- return handleOidcLogin(request, {
161
- oauthConfig,
162
- secret: process.env.SESSION_SECRET!,
163
- cookies: await nextCookieStore(),
164
- rateLimit: () => limiter.consume(clientKey(request)),
165
- });
166
- }
209
+ export const auth = createFidesAuth({
210
+ oauthConfig,
211
+ secret,
212
+ rateLimit: (request) => limiter.consume(clientKey(request)),
213
+ });
167
214
  ```
168
215
 
169
- `handleOidcCallback`, `handleOidcLogout` and `handleHeartbeat` take the same option.
170
- With a `sessionStore`, also pass those three
171
- `persistence: serverPersistence({ store: sessionStore, secret })`, or they keep
172
- the session in cookies. Build it once. It does not share refreshes with `auth`,
173
- so give the store `withLock`.
174
-
175
- ## Documentation
216
+ ## Upgrading from 0.x
176
217
 
177
- - [Store API](./src/store/) - XState Store details
178
- - [Setup Guide](./SETUP_GUIDE.md) - Complete walkthrough
218
+ See [Upgrading to 1.0](../fides-auth/docs/migrating-to-1.0.md).
package/dist/auth.d.ts CHANGED
@@ -1,76 +1,101 @@
1
1
  /**
2
- * The session helpers and route handlers, bound to one secret and OAuth config.
3
- * No module state: the config lives in the returned object, so a module that
4
- * Next loads more than once behaves the same.
2
+ * createFidesAuth for Next.js. The core instance takes a CookieStore on every
3
+ * call; this one gets it from `cookies()` in next/headers, caches session reads
4
+ * per render, and adds refreshInProxy for `proxy.ts`.
5
5
  */
6
- import { AuthorizedFetchError, type AuthorizedFetchErrorReason, type AuthorizedFetchOptions, type AuthorizedFetchResult, type ClearSessionOptions, type ReadSessionResult, type RefreshSessionResult, type SessionSecret, type SessionStore, type StoredSession } from '@eventuras/fides-auth/server';
7
- import type { OAuthConfig } from '@eventuras/fides-auth/oauth';
8
- import type { CreateSessionOptions, Session } from '@eventuras/fides-auth/types';
9
- import { type OidcCallbackConfig } from './oidc-callback';
10
- import { type OidcLoginConfig } from './oidc-login';
11
- import { type OidcLogoutConfig } from './oidc-logout';
12
- export type { ClearSessionOptions, ReadSessionResult, RefreshSessionResult, SessionSecret };
13
- export type { SessionStore, StoredSession };
14
- export type { AuthorizedFetchErrorReason, AuthorizedFetchOptions, AuthorizedFetchResult };
15
- export { AuthorizedFetchError };
16
- export interface FidesAuthConfig {
17
- /** Session encryption secret, e.g. 64 hex chars. Also seals the login transaction. */
18
- secret: SessionSecret;
19
- /** OAuth/OIDC configuration. */
20
- oauthConfig: OAuthConfig;
6
+ import type { Session, TokenResponse, Tokens } from '@eventuras/fides-auth';
7
+ import type { OidcClient } from '@eventuras/fides-auth/oidc';
8
+ import { type FidesAuthConfig, type FidesAuthorizedFetchOptions, type FidesReadResult, type FidesRefreshResult, type RefreshSessionOptions } from '@eventuras/fides-auth/server';
9
+ import type { SessionClearedTrigger } from '@eventuras/fides-auth/session-events';
10
+ import { type NextRequest, NextResponse } from 'next/server';
11
+ /** Options for {@link FidesAuth.refreshInProxy}. */
12
+ export interface RefreshInProxyOptions {
21
13
  /**
22
- * Keeps sessions in this store, encrypted under `secret`; the cookie holds only a handle.
23
- * Omit to keep them in encrypted cookies.
14
+ * Refresh when the access token expires within this many seconds.
15
+ * @default 60
24
16
  */
25
- sessionStore?: SessionStore;
17
+ ifExpiresWithin?: number;
26
18
  }
27
- /** A handler's config minus what the factory binds. */
28
- type Bound<T> = Omit<T, 'oauthConfig' | 'secret' | 'persistence'>;
29
- export type BoundAuthorizedFetchOptions<T = undefined> = Omit<AuthorizedFetchOptions<T>, 'refresh'> & {
19
+ /** The core instance's members, bound to the request's cookies. */
20
+ export interface FidesAuth {
21
+ /** `GET`, with an optional `?returnTo=`. Redirects to the provider. */
22
+ handleOidcLogin(request: Request, options?: {
23
+ authorizationParameters?: Record<string, string>;
24
+ }): Promise<Response>;
25
+ /** The provider's redirect back. Starts the session and redirects to the return path. */
26
+ handleOidcCallback(request: Request): Promise<Response>;
27
+ /** `POST`. Ends the session and redirects to the provider's end-session endpoint. */
28
+ handleOidcLogout(request: Request, options?: {
29
+ state?: string;
30
+ logoutHint?: string;
31
+ }): Promise<Response>;
32
+ /** `POST`. Refreshes the session. 401 means it is over; 503 means the provider couldn't be reached. */
33
+ handleHeartbeat(request: Request): Promise<Response>;
34
+ /** `GET`. Whether there is a session, and whose. Never refreshes, never returns tokens. */
35
+ handleSessionInfo(request: Request): Promise<Response>;
36
+ /** The session, or null. Cached per render. */
37
+ readSession(): Promise<Session | null>;
38
+ /** The session, or why there is none. Cached per render, together with `readSession`. */
39
+ tryReadSession(): Promise<FidesReadResult>;
40
+ /** The session's tokens, or null without a session. The access token may have expired. */
41
+ getTokens(): Promise<Tokens | null>;
30
42
  /**
31
- * `false` skips the refresh, so a 401 is an `http_error`. Use it in a Server Component:
32
- * Next won't let it write cookies, and a refresh that can't be saved spends the refresh token.
43
+ * Refreshes the tokens, or with `ifExpiresWithin` only when the access token
44
+ * is about to expire. With cookie sessions this writes cookies, so it works
45
+ * only in Server Actions and Route Handlers; pages get theirs from
46
+ * `refreshInProxy`.
33
47
  */
34
- refresh?: false;
35
- };
36
- export interface FidesAuth {
37
- /** The current session, or null. Cached per render; the access token may have expired. */
38
- getCurrentSession(): Promise<Session<any> | null>;
39
- /** The current session, or why there is none. Shares the cache with `getCurrentSession`. */
40
- tryGetCurrentSession(): Promise<ReadSessionResult>;
41
- /** Refreshes the session and saves it. Null on any failure. */
42
- refreshCurrentSession(options?: CreateSessionOptions): Promise<Session | null>;
43
- /** Refreshes the session and, on failure, says why. Prefer it over `refreshCurrentSession`. */
44
- tryRefreshCurrentSession(options?: CreateSessionOptions): Promise<RefreshSessionResult>;
45
- /** Persists a new session. Returns the session cookie's value: the encrypted session, or the handle. */
46
- createAndPersistSession(session: Session): Promise<string>;
47
- /** Deletes the session cookies and, with a `sessionStore`, the record. `trigger` defaults to `logout`. */
48
- clearCurrentSession(options?: ClearSessionOptions): Promise<void>;
48
+ refreshSession(options?: RefreshSessionOptions): Promise<FidesRefreshResult>;
49
+ /** Starts a session from a token response, for a login that doesn't go through the handlers. */
50
+ createSession(tokens: TokenResponse): Promise<Session>;
51
+ /** Changes the user or data. Null when there is no session. */
52
+ updateSession(update: (session: Session) => Session | Promise<Session>): Promise<Session | null>;
53
+ /** Ends the session. With a store, the record is deleted too. `trigger` defaults to `'logout'`. */
54
+ clearSession(options?: {
55
+ trigger?: SessionClearedTrigger;
56
+ }): Promise<void>;
49
57
  /**
50
- * `authorizedFetch` that, on a 401, refreshes the session and retries once.
51
- * Parallel calls in one request share one refresh. The refresh writes cookies, so it works
52
- * only in Server Actions and Route Handlers; pass `refresh: false` in a Server Component.
58
+ * Calls an API with the session's access token. It never refreshes, so it is
59
+ * safe in a Server Component; a 401 is an `http_error`.
53
60
  */
54
- authorizedFetch<T = undefined>(session: Session, url: string | URL, options: BoundAuthorizedFetchOptions<T>): Promise<AuthorizedFetchResult<T>>;
55
- handleOidcLogin(request: Request, options?: Bound<OidcLoginConfig>): Promise<Response>;
56
- handleOidcCallback(request: Request, options: Bound<OidcCallbackConfig>): Promise<Response>;
57
- handleOidcLogout(request: Request, options: Bound<OidcLogoutConfig>): Promise<Response>;
58
- handleHeartbeat(request: Request): Promise<Response>;
61
+ authorizedFetch<T = undefined>(url: string | URL, options: FidesAuthorizedFetchOptions<T>): Promise<{
62
+ response: Response;
63
+ data: T;
64
+ }>;
65
+ /**
66
+ * For `proxy.ts`. Refreshes a session whose access token expires within
67
+ * `ifExpiresWithin` seconds, before the page renders, since a Server Component
68
+ * can't save a refresh. Sets the new cookies on the response and on the
69
+ * request it forwards, so the page reads the refreshed session.
70
+ *
71
+ * A failed refresh leaves the session as it is. The next API call or
72
+ * heartbeat shows a session that is over; ending it here could undo a refresh
73
+ * that another instance completed with the same refresh token.
74
+ */
75
+ refreshInProxy(request: NextRequest, options?: RefreshInProxyOptions): Promise<NextResponse>;
76
+ /** The session cookie's name, for a proxy that checks whether one is present. */
77
+ readonly cookieNames: {
78
+ session: string;
79
+ };
80
+ /** The instance's OIDC client, for protocol calls it doesn't wrap. */
81
+ readonly oidc: OidcClient;
59
82
  }
60
83
  /**
61
- * Creates the app's auth helpers. Call it once and import the result.
84
+ * Creates the app's auth instance. Call it once, in a module of its own, and
85
+ * import the result. It reads nothing from the environment: pass the secret and
86
+ * the provider config in.
62
87
  *
63
88
  * @example
64
89
  * ```ts
65
90
  * // lib/auth.ts
66
- * export const auth = createFidesAuth({ secret: process.env.SESSION_SECRET!, oauthConfig });
91
+ * export const auth = createFidesAuth({ oauthConfig, secret: process.env.SESSION_SECRET! });
67
92
  *
68
93
  * // app/api/auth/login/route.ts
69
94
  * export const GET = (request: Request) => auth.handleOidcLogin(request);
70
95
  *
71
- * // A server component
72
- * const session = await auth.getCurrentSession();
96
+ * // A Server Component
97
+ * const session = await auth.readSession();
73
98
  * ```
74
99
  */
75
- export declare function createFidesAuth({ secret, oauthConfig, sessionStore }: FidesAuthConfig): FidesAuth;
100
+ export declare function createFidesAuth(config: FidesAuthConfig): FidesAuth;
76
101
  //# sourceMappingUR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