Sessions

Members

(inner, constant) excludeFromGeneratedIndex :Array.<string>

Description:
  • Exported functions that are excluded from index generation.
Source:
Exported functions that are excluded from index generation.
Type:
  • Array.<string>

Methods

(static) generateAuthSessionUrl(userId, redirectTo) → {Promise.<string>}

Source:
Example
const authUrl = await generateAuthSessionUrl(592656, 'https://app.musora.com/drumeo')
Parameters:
Name Type Description
userId number
redirectTo string
Returns:
Type
Promise.<string>

(static) login(email, password, deviceName, deviceToken, platform) → {Promise.<AuthResponse>}

Description:
  • Authenticates the User.
Source:
Example
login('john@doe.com', 'music123')
  .then(content => console.log(content))
  .catch(error => console.error(error));
Parameters:
Name Type Description
email string User's email
password string User's password
deviceName string | null Device name for the user
deviceToken string | null Firebase token for the device
platform string | null Device platform
Returns:
- User data and authentication token
Type
Promise.<AuthResponse>

(static) logout() → {Promise.<void>}

Description:
  • Logs the user out of the current session. Clears all cached data to prevent data leakage between users.
Source:
Example
logout()
  .then()
  .catch(error => console.error(error));
Returns:
Type
Promise.<void>