@salesforce/webapp-template-feature-react-authentication-experimental 1.103.6 → 1.104.1
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/dist/CHANGELOG.md +16 -0
- package/dist/force-app/main/default/webapplications/feature-react-authentication/src/features/authentication/api/userProfileApi.ts +3 -3
- package/dist/force-app/main/default/webapplications/feature-react-authentication/src/features/authentication/pages/ChangePassword.tsx +2 -2
- package/dist/force-app/main/default/webapplications/feature-react-authentication/src/features/authentication/pages/ForgotPassword.tsx +2 -2
- package/dist/force-app/main/default/webapplications/feature-react-authentication/src/features/authentication/pages/Login.tsx +2 -2
- package/dist/force-app/main/default/webapplications/feature-react-authentication/src/features/authentication/pages/Register.tsx +2 -2
- package/dist/force-app/main/default/webapplications/feature-react-authentication/src/features/authentication/pages/ResetPassword.tsx +2 -2
- package/dist/package.json +1 -1
- package/package.json +2 -2
package/dist/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,22 @@
|
|
|
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
|
+
## [1.104.1](https://github.com/salesforce-experience-platform-emu/webapps/compare/v1.104.0...v1.104.1) (2026-03-17)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @salesforce/webapp-template-base-sfdx-project-experimental
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# [1.104.0](https://github.com/salesforce-experience-platform-emu/webapps/compare/v1.103.6...v1.104.0) (2026-03-17)
|
|
15
|
+
|
|
16
|
+
**Note:** Version bump only for package @salesforce/webapp-template-base-sfdx-project-experimental
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
6
22
|
## [1.103.6](https://github.com/salesforce-experience-platform-emu/webapps/compare/v1.103.5...v1.103.6) (2026-03-17)
|
|
7
23
|
|
|
8
24
|
**Note:** Version bump only for package @salesforce/webapp-template-base-sfdx-project-experimental
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Extensible user profile fetching and updating via UI API GraphQL.
|
|
3
3
|
*/
|
|
4
|
-
import {
|
|
4
|
+
import { createDataSDK } from "@salesforce/sdk-data";
|
|
5
5
|
import { flattenGraphQLRecord } from "../utils/helpers";
|
|
6
6
|
|
|
7
7
|
const USER_PROFILE_FIELDS_FULL = `
|
|
@@ -61,7 +61,7 @@ export async function fetchUserProfile<T>(
|
|
|
61
61
|
userId: string,
|
|
62
62
|
fields: string = USER_PROFILE_FIELDS_FULL,
|
|
63
63
|
): Promise<T> {
|
|
64
|
-
const data = await
|
|
64
|
+
const data = await createDataSDK();
|
|
65
65
|
const response: any = await data.graphql?.(getUserProfileQuery(fields), {
|
|
66
66
|
userId,
|
|
67
67
|
});
|
|
@@ -86,7 +86,7 @@ export async function updateUserProfile<T>(
|
|
|
86
86
|
userId: string,
|
|
87
87
|
values: Record<string, unknown>,
|
|
88
88
|
): Promise<T> {
|
|
89
|
-
const data = await
|
|
89
|
+
const data = await createDataSDK();
|
|
90
90
|
const response: any = await data.graphql?.(getUserProfileMutation(USER_PROFILE_FIELDS_FULL), {
|
|
91
91
|
input: { Id: userId, User: { ...values } },
|
|
92
92
|
});
|
|
@@ -4,7 +4,7 @@ import { z } from "zod";
|
|
|
4
4
|
import { CenteredPageLayout } from "../layout/centered-page-layout";
|
|
5
5
|
import { AuthForm } from "../forms/auth-form";
|
|
6
6
|
import { useAppForm } from "../hooks/form";
|
|
7
|
-
import {
|
|
7
|
+
import { createDataSDK } from "@salesforce/sdk-data";
|
|
8
8
|
import { ROUTES, AUTH_PLACEHOLDERS } from "../authenticationConfig";
|
|
9
9
|
import { newPasswordSchema } from "../authHelpers";
|
|
10
10
|
import { handleApiResponse, getErrorMessage } from "../utils/helpers";
|
|
@@ -28,7 +28,7 @@ export default function ChangePassword() {
|
|
|
28
28
|
try {
|
|
29
29
|
// [Dev Note] Custom Apex Endpoint: /auth/change-password
|
|
30
30
|
// You must ensure this Apex class exists in your org
|
|
31
|
-
const sdk = await
|
|
31
|
+
const sdk = await createDataSDK();
|
|
32
32
|
const response = await sdk.fetch!("/services/apexrest/auth/change-password", {
|
|
33
33
|
method: "POST",
|
|
34
34
|
body: JSON.stringify({
|
|
@@ -3,7 +3,7 @@ import { z } from "zod";
|
|
|
3
3
|
import { CenteredPageLayout } from "../layout/centered-page-layout";
|
|
4
4
|
import { AuthForm } from "../forms/auth-form";
|
|
5
5
|
import { useAppForm } from "../hooks/form";
|
|
6
|
-
import {
|
|
6
|
+
import { createDataSDK } from "@salesforce/sdk-data";
|
|
7
7
|
import { ROUTES, AUTH_PLACEHOLDERS } from "../authenticationConfig";
|
|
8
8
|
import { handleApiResponse, getErrorMessage } from "../utils/helpers";
|
|
9
9
|
|
|
@@ -24,7 +24,7 @@ export default function ForgotPassword() {
|
|
|
24
24
|
try {
|
|
25
25
|
// [Dev Note] Custom Apex Endpoint: /auth/forgot-password
|
|
26
26
|
// You must ensure this Apex class exists in your org
|
|
27
|
-
const sdk = await
|
|
27
|
+
const sdk = await createDataSDK();
|
|
28
28
|
const response = await sdk.fetch!("/services/apexrest/auth/forgot-password", {
|
|
29
29
|
method: "POST",
|
|
30
30
|
body: JSON.stringify({ username: value.username.trim() }),
|
|
@@ -4,7 +4,7 @@ import { z } from "zod";
|
|
|
4
4
|
import { CenteredPageLayout } from "../layout/centered-page-layout";
|
|
5
5
|
import { AuthForm } from "../forms/auth-form";
|
|
6
6
|
import { useAppForm } from "../hooks/form";
|
|
7
|
-
import {
|
|
7
|
+
import { createDataSDK } from "@salesforce/sdk-data";
|
|
8
8
|
import { ROUTES } from "../authenticationConfig";
|
|
9
9
|
import { emailSchema, getStartUrl, type AuthResponse } from "../authHelpers";
|
|
10
10
|
import { handleApiResponse, getErrorMessage } from "../utils/helpers";
|
|
@@ -30,7 +30,7 @@ export default function Login() {
|
|
|
30
30
|
// "/services/apexrest/auth/login" refers to a custom Apex REST resource.
|
|
31
31
|
// You must ensure this Apex class exists in your org and handles the login logic
|
|
32
32
|
// (e.g., creating a session or returning a token).
|
|
33
|
-
const sdk = await
|
|
33
|
+
const sdk = await createDataSDK();
|
|
34
34
|
const response = await sdk.fetch!("/services/apexrest/auth/login", {
|
|
35
35
|
method: "POST",
|
|
36
36
|
body: JSON.stringify({
|
|
@@ -4,7 +4,7 @@ import { z } from "zod";
|
|
|
4
4
|
import { CenteredPageLayout } from "../layout/centered-page-layout";
|
|
5
5
|
import { AuthForm } from "../forms/auth-form";
|
|
6
6
|
import { useAppForm } from "../hooks/form";
|
|
7
|
-
import {
|
|
7
|
+
import { createDataSDK } from "@salesforce/sdk-data";
|
|
8
8
|
import { ROUTES, AUTH_PLACEHOLDERS } from "../authenticationConfig";
|
|
9
9
|
import { emailSchema, passwordSchema, getStartUrl, type AuthResponse } from "../authHelpers";
|
|
10
10
|
import { handleApiResponse, getErrorMessage } from "../utils/helpers";
|
|
@@ -47,7 +47,7 @@ export default function Register() {
|
|
|
47
47
|
// You must ensure this Apex class exists in your org and handles registration
|
|
48
48
|
// (e.g., duplicate checks and user creation such as Site.createExternalUser).
|
|
49
49
|
const { confirmPassword, ...request } = formFieldValues;
|
|
50
|
-
const sdk = await
|
|
50
|
+
const sdk = await createDataSDK();
|
|
51
51
|
const response = await sdk.fetch!("/services/apexrest/auth/register", {
|
|
52
52
|
method: "POST",
|
|
53
53
|
body: JSON.stringify({ request }),
|
|
@@ -5,7 +5,7 @@ import { CenteredPageLayout } from "../layout/centered-page-layout";
|
|
|
5
5
|
import { AuthForm } from "../forms/auth-form";
|
|
6
6
|
import { StatusAlert } from "../../../components/alerts/status-alert";
|
|
7
7
|
import { useAppForm } from "../hooks/form";
|
|
8
|
-
import {
|
|
8
|
+
import { createDataSDK } from "@salesforce/sdk-data";
|
|
9
9
|
import { ROUTES, AUTH_PLACEHOLDERS } from "../authenticationConfig";
|
|
10
10
|
import { newPasswordSchema } from "../authHelpers";
|
|
11
11
|
import { handleApiResponse, getErrorMessage } from "../utils/helpers";
|
|
@@ -25,7 +25,7 @@ export default function ResetPassword() {
|
|
|
25
25
|
try {
|
|
26
26
|
// [Dev Note] Custom Apex Endpoint: /auth/reset-password
|
|
27
27
|
// You must ensure this Apex class exists in your org
|
|
28
|
-
const sdk = await
|
|
28
|
+
const sdk = await createDataSDK();
|
|
29
29
|
const response = await sdk.fetch!("/services/apexrest/auth/reset-password", {
|
|
30
30
|
method: "POST",
|
|
31
31
|
body: JSON.stringify({ token, newPassword: value.newPassword }),
|
package/dist/package.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/webapp-template-feature-react-authentication-experimental",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.104.1",
|
|
4
4
|
"description": "Authentication feature for web applications",
|
|
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/webapp-experimental": "^1.
|
|
19
|
+
"@salesforce/webapp-experimental": "^1.104.1",
|
|
20
20
|
"@tanstack/react-form": "^1.27.7",
|
|
21
21
|
"@types/react": "^19.2.7",
|
|
22
22
|
"@types/react-dom": "^19.2.3",
|