@salesforce/ui-bundle-template-feature-react-authentication 12.4.1 → 12.4.3

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,7 +8,7 @@ This feature provides authentication functionality for Salesforce UI Bundles, in
8
8
 
9
9
  ## Features
10
10
 
11
- - Checks authentication status via Salesforce Chatter API (`/chatter/users/me`)
11
+ - Checks authentication status via UI API GraphQL (`uiapi.currentUser`)
12
12
  - Protects routes with automatic redirect to login
13
13
  - Supports return URL (`retUrl`) query parameter for post-login navigation
14
14
  - Displays user profile information from Salesforce
@@ -77,16 +77,16 @@ dev server proxies `sdk.fetch` to the org **outside the Experience site's
77
77
  guest/community context**, so `Site.getBaseUrl()` is blank and the site session does
78
78
  not exist.
79
79
 
80
- | Surface | Local preview (`localhost`) | Deployed site |
81
- | ------------------------------------ | ----------------------------------------------------------------------------------------------------- | -------------------------------------------------------- |
82
- | **Social Login buttons** | Not shown — `/auth/social-login-config` returns `{"authProviders":[],"samlProviders":[]}`. | Renders configured providers |
83
- | **MFA challenge** (`ForceTwoFactor`) | `Site.login()` cannot establish the site session, so login returns _"Your login attempt has failed…"_ | Works — platform renders and completes the MFA challenge |
84
- | **`/chatter/users/me`** | May return `401` (no site session) | Works |
80
+ | Surface | Local preview (`localhost`) | Deployed site |
81
+ | -------------------------------------------- | ------------------------------------------------------------------------------------------------------ | -------------------------------------------------------- |
82
+ | **Social Login buttons** | Not shown — `/auth/social-login-config` returns `{"authProviders":[],"samlProviders":[]}`. | Renders configured providers |
83
+ | **MFA challenge** (`ForceTwoFactor`) | `Site.login()` cannot establish the site session, so login returns _"Your login attempt has failed…"_ | Works — platform renders and completes the MFA challenge |
84
+ | **Current-user check** (`uiapi.currentUser`) | Works — the local dev proxy forwards `/services/data/**` GraphQL calls with the CLI-authenticated user | Works |
85
85
 
86
86
  **How to test these:** open the **published site** login page, e.g.
87
- `https://<your-domain>.site.com/<site-path>/login`. The empty responses and `401`s
88
- above are expected locally and are **not** a misconfiguration — the deploy and
89
- provider linking (`AuthConfigProviders`) are verified server-side.
87
+ `https://<your-domain>.site.com/<site-path>/login`. The empty response and login
88
+ failure above are expected locally and are **not** a misconfiguration — the deploy
89
+ and provider linking (`AuthConfigProviders`) are verified server-side.
90
90
 
91
91
  ## Notes
92
92
 
package/dist/CHANGELOG.md CHANGED
@@ -3,6 +3,23 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [12.4.3](https://github.com/salesforce-experience-platform-emu/webapps/compare/v12.4.2...v12.4.3) (2026-09-03)
7
+
8
+ **Note:** Version bump only for package @salesforce/ui-bundle-template-base-sfdx-project
9
+
10
+
11
+
12
+
13
+
14
+ ## [12.4.2](https://github.com/salesforce-experience-platform-emu/webapps/compare/v12.4.1...v12.4.2) (2026-09-02)
15
+
16
+
17
+ ### Bug Fixes
18
+
19
+ * **ui-bundle:** use UI API GraphQL instead of Chatter for current-user lookup ([#951](https://github.com/salesforce-experience-platform-emu/webapps/issues/951)) ([47c28c1](https://github.com/salesforce-experience-platform-emu/webapps/commit/47c28c10a0b838eacef6c4a3e45e3a4fe587d20a))
20
+
21
+
22
+
6
23
  ## [12.4.1](https://github.com/salesforce-experience-platform-emu/webapps/compare/v12.4.0...v12.4.1) (2026-09-02)
7
24
 
8
25
  **Note:** Version bump only for package @salesforce/ui-bundle-template-base-sfdx-project
@@ -19,8 +19,8 @@
19
19
  "graphql:schema": "node scripts/get-graphql-schema.mjs"
20
20
  },
21
21
  "dependencies": {
22
- "@salesforce/platform-sdk": "^12.4.1",
23
- "@salesforce/ui-bundle": "^12.4.1",
22
+ "@salesforce/platform-sdk": "^12.4.3",
23
+ "@salesforce/ui-bundle": "^12.4.3",
24
24
  "@tailwindcss/vite": "^4.1.17",
25
25
  "class-variance-authority": "^0.7.1",
26
26
  "clsx": "^2.1.1",
@@ -47,8 +47,8 @@
47
47
  "@graphql-eslint/eslint-plugin": "^4.1.0",
48
48
  "@graphql-tools/utils": "^11.0.0",
49
49
  "@playwright/test": "^1.49.0",
50
- "@salesforce/graphiti": "^12.4.1",
51
- "@salesforce/vite-plugin-ui-bundle": "^12.4.1",
50
+ "@salesforce/graphiti": "^12.4.3",
51
+ "@salesforce/vite-plugin-ui-bundle": "^12.4.3",
52
52
  "@testing-library/jest-dom": "^6.6.3",
53
53
  "@testing-library/react": "^16.1.0",
54
54
  "@testing-library/user-event": "^14.5.2",
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@salesforce/ui-bundle-template-base-sfdx-project",
3
- "version": "12.4.1",
3
+ "version": "12.4.3",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@salesforce/ui-bundle-template-base-sfdx-project",
9
- "version": "12.4.1",
9
+ "version": "12.4.3",
10
10
  "license": "SEE LICENSE IN LICENSE.txt",
11
11
  "dependencies": {
12
12
  "fast-xml-parser": "^5.9.3",
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/ui-bundle-template-base-sfdx-project",
3
- "version": "12.4.1",
3
+ "version": "12.4.3",
4
4
  "description": "Base SFDX project template",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "publishConfig": {
@@ -72,8 +72,8 @@ export const ConfigSchema = z
72
72
  // Required because React (Site Container) sites hide SSO config in Admin UI.
73
73
  authProviderNames: z.array(z.string().min(1)).min(1),
74
74
  // Permission set to assign to community users created via SSO.
75
- // Required because getCurrentUser() calls /chatter/users/me which needs
76
- // API access (PermissionsApiEnabled) that the community profile lacks.
75
+ // Required because getCurrentUser() calls UI API GraphQL (uiapi.currentUser)
76
+ // which needs API access (PermissionsApiEnabled) that the community profile lacks.
77
77
  // Typically the app's "*_Guest_User_Api_Access" permset.
78
78
  communityUserPermset: z.string().min(1).optional(),
79
79
  })
@@ -546,7 +546,7 @@ function loadSelfRegConfig(config) {
546
546
  * - communityMemberProfile: profile added to NetworkMemberGroup (required for access)
547
547
  * - authProviderNames: DeveloperNames of AuthProvider (OAuth) or SamlSsoConfig (SAML) records to link to site
548
548
  * - communityUserPermset: permset assigned to community users so getCurrentUser()
549
- * works (requires PermissionsApiEnabled for /chatter/users/me via /sf/api/)
549
+ * works (requires PermissionsApiEnabled for UI API GraphQL via /sf/api/)
550
550
  *
551
551
  * Returns null if no "socialLogin" section exists in config (the step is hidden).
552
552
  */
@@ -937,7 +937,7 @@ function addCommunityMemberProfile(profileName, siteName, targetOrg) {
937
937
  * Assign a permission set to all existing community users with a given profile.
938
938
  *
939
939
  * After SSO login, community users need the app's API-enabled permset so that
940
- * getCurrentUser() (which calls /chatter/users/me via the /sf/api/ proxy) works.
940
+ * getCurrentUser() (which calls UI API GraphQL via the /sf/api/ proxy) works.
941
941
  * Without PermissionsApiEnabled the proxy returns API_DISABLED_FOR_ORG and the
942
942
  * React app treats the user as unauthenticated.
943
943
  *
@@ -2309,7 +2309,7 @@ async function main() {
2309
2309
  addCommunityMemberProfile(socialLoginConfig.communityMemberProfile, siteName, targetOrg);
2310
2310
 
2311
2311
  // Sub-step 4 (optional): Assign API-enabled permset to community users.
2312
- // Without this, getCurrentUser() fails because /chatter/users/me requires
2312
+ // Without this, getCurrentUser() fails because UI API GraphQL requires
2313
2313
  // PermissionsApiEnabled which the standard community profile lacks.
2314
2314
  if (socialLoginConfig.communityUserPermset) {
2315
2315
  console.log(` [4/${totalSubSteps}] Assigning API permset to community users...`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/ui-bundle-template-feature-react-authentication",
3
- "version": "12.4.1",
3
+ "version": "12.4.3",
4
4
  "description": "Authentication feature for UI Bundles",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "author": "",
@@ -16,7 +16,7 @@
16
16
  "clean": "rm -rf dist"
17
17
  },
18
18
  "devDependencies": {
19
- "@salesforce/ui-bundle": "^12.4.1",
19
+ "@salesforce/ui-bundle": "^12.4.3",
20
20
  "@tanstack/react-form": "^1.27.7",
21
21
  "@types/react": "^19.2.7",
22
22
  "@types/react-dom": "^19.2.3",