@absolutejs/auth 0.83.0 → 0.85.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/docs/neon.md ADDED
@@ -0,0 +1,49 @@
1
+ # Neon partner OAuth
2
+
3
+ Neon direct OAuth requires a registered partner application and an active commercial
4
+ relationship. This preset does not register an application or confer partner status.
5
+ See https://neon.com/docs/guides/oauth-integration for registration and callback requirements.
6
+
7
+ ```ts
8
+ import { createNeonProviderConfiguration } from '@absolutejs/auth/providers';
9
+
10
+ const neon = createNeonProviderConfiguration({
11
+ credentials: {
12
+ clientId: process.env.NEON_CLIENT_ID!,
13
+ clientSecret: process.env.NEON_CLIENT_SECRET!,
14
+ redirectUri: 'https://app.example.com/auth/neon/callback'
15
+ },
16
+ scopes: ['urn:neoncloud:orgs:read', 'urn:neoncloud:projects:read'],
17
+ offlineAccess: true
18
+ });
19
+ // Pass providersConfiguration: { neon } to your existing Auth configuration.
20
+ ```
21
+
22
+ Keep credentials on the server. Register the exact callback used by your Auth
23
+ mount. The preset enables S256 PKCE, identifies accounts by `sub`, and requests
24
+ `openid`. Management permissions must be explicit. `offlineAccess` adds both
25
+ `offline` and `offline_access`; it defaults to false. Request create/update only
26
+ when the customer needs those operations. Delete and organization administration
27
+ are never implicit. Do not infer an email or organization from the subject.
28
+
29
+ The existing built-in provider authorization, callback, profile, refresh and revoke
30
+ routes handle this definition. An account connection is separate from signing the
31
+ customer into your application; enforce your application's account-linking policy.
32
+ The generic `createOAuthLinkedProviderCredentialResolver` recognizes Neon through
33
+ Citra's built-in provider registry, including background token renewal.
34
+ This preset alone does not
35
+ provide a resource picker, database provisioning, secret delivery or browser
36
+ assistance. Do not enable the customer-facing connection until those pieces and
37
+ partner credentials are in place.
38
+
39
+ Use a provider-owned sign-in window where required. Do not proxy sign-in into an
40
+ embedded browser that violates the identity provider's policies. Never put client
41
+ secrets, refresh tokens or database connection strings into chat or referral URLs.
42
+ Referral agreements and reporting are separate from OAuth permission grants.
43
+
44
+ ## Migration from 0.84.0
45
+
46
+ Move the helper result from `customProviders.neon` to
47
+ `providersConfiguration.neon`. Neon is now a built-in Citra provider; retaining a
48
+ custom provider under that name is rejected to prevent provider collisions.
49
+ The helper retains the same credentials, scopes and offline-access options.
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.83.0",
2
+ "version": "0.85.0",
3
3
  "name": "@absolutejs/auth",
4
4
  "description": "An authorization library for absolutejs",
5
5
  "repository": {
@@ -75,7 +75,7 @@
75
75
  "@neondatabase/serverless": "1.0.0",
76
76
  "@opentelemetry/api": "1.9.1",
77
77
  "@simplewebauthn/browser": "13.3.0",
78
- "citra": "0.29.13",
78
+ "citra": "0.30.0",
79
79
  "typebox": "^1.3.16"
80
80
  },
81
81
  "devDependencies": {