musora-content-services 2.39.4 → 2.39.5
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/CHANGELOG.md +2 -0
- package/package.json +1 -1
- package/src/services/user/sessions.js +11 -19
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [2.39.5](https://github.com/railroadmedia/musora-content-services/compare/v2.39.4...v2.39.5) (2025-09-16)
|
|
6
|
+
|
|
5
7
|
### [2.39.4](https://github.com/railroadmedia/musora-content-services/compare/v2.39.3...v2.39.4) (2025-09-16)
|
|
6
8
|
|
|
7
9
|
### [2.39.3](https://github.com/railroadmedia/musora-content-services/compare/v2.39.2...v2.39.3) (2025-09-16)
|
package/package.json
CHANGED
|
@@ -12,28 +12,20 @@ import './types.js'
|
|
|
12
12
|
const excludeFromGeneratedIndex = []
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
|
-
*
|
|
15
|
+
* Authenticates the User.
|
|
16
16
|
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
17
|
+
* @param {string} email - User's email
|
|
18
|
+
* @param {string} password - User's password
|
|
19
|
+
* @param {string|null} deviceName - Device name for the user
|
|
20
|
+
* @param {string|null} deviceToken - Firebase token for the device
|
|
21
|
+
* @param {string|null} platform - Device platform
|
|
19
22
|
*
|
|
20
|
-
* @
|
|
21
|
-
* @param {string} password - The user's account password.
|
|
22
|
-
* @param {string|null} [deviceName] - A human-readable identifier for the device (e.g. "iPhone 15").
|
|
23
|
-
* @param {string|null} [deviceToken] - Optional Firebase Cloud Messaging token for push notifications.
|
|
24
|
-
* @param {string|null} [platform] - The device platform (e.g. "ios", "android", "web").
|
|
25
|
-
*
|
|
26
|
-
* @returns {Promise<Response>} - The raw `fetch` Response object.
|
|
27
|
-
* Call `response.json()` to access the API payload, which typically includes:
|
|
28
|
-
* - `token` (string): Access token.
|
|
29
|
-
* - `refresh_token` (string): Refresh token.
|
|
30
|
-
* - `user` (object): Authenticated user data.
|
|
23
|
+
* @returns {Promise<AuthResponse>} - User data and authentication token
|
|
31
24
|
*
|
|
32
25
|
* @example
|
|
33
|
-
* login('john@doe.com', 'music123'
|
|
34
|
-
* .then(
|
|
35
|
-
* .
|
|
36
|
-
* .catch(err => console.error(err));
|
|
26
|
+
* login('john@doe.com', 'music123')
|
|
27
|
+
* .then(content => console.log(content))
|
|
28
|
+
* .catch(error => console.error(error));
|
|
37
29
|
*/
|
|
38
30
|
export async function login(email, password, deviceName, deviceToken, platform) {
|
|
39
31
|
const baseUrl = `${globalConfig.baseUrl}/api/user-management-system`
|
|
@@ -59,7 +51,7 @@ export async function loginWithProvider(provider, providerIdToken, deviceToken,
|
|
|
59
51
|
|
|
60
52
|
try {
|
|
61
53
|
const response = await fetch(`${baseUrl}/v1/auth/${provider}/mobile`, {
|
|
62
|
-
method: '
|
|
54
|
+
method: 'POST',
|
|
63
55
|
headers: {
|
|
64
56
|
'Content-Type': 'application/json',
|
|
65
57
|
'X-Client-Platform': 'mobile',
|