🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

@genesislcap/foundation-user

Package Overview
Dependencies
Maintainers
1
Versions
747
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@genesislcap/foundation-user

Genesis User

14.278.3
latest
Source
npm
Version published
Weekly downloads
3.8K
-18.5%
Maintainers
1
Weekly downloads
 
Created
Source

Genesis User

lerna TypeScript

foundation-user provides the User singleton, which always exists in either an anonymous or authenticated mode.

Get User reference

User is a singleton. You can access it via the DI container.

import { User } from '@genesislcap/foundation-user';
...
@User private user: User

...or via a utility if your app is not using decorators or the DI container.

import { getUser } from '@genesislcap/foundation-user';
...
private user = getUser();

User properties are decorated with @observable, meaning in FAST terms it's reactive, and you can bind to properties directly. For example, this.user.isAuthenticated. However, you can also monitor the user's authentication status using an event listener.

import type { UserAuthenticationChangeEvent } from '@genesislcap/foundation-user';
...
const unsubscribeUser = this.user.addAuthenticationChangeListener((event: UserAuthenticationChangeEvent) => {
  console.log('User authenticated?', event.detail); // < boolean === this.user.isAuthenticated
});

See the User API Docs for more information.

Installation

To enable this module in your application, follow the steps below.

  • Add @genesislcap/foundation-user as a dependency in your package.json file. Whenever you change the dependencies of your project, ensure you run the $ npm run bootstrap command again. You can find more information in the package.json basics page.
{
  ...
  "dependencies": {
    ...
    "@genesislcap/foundation-user": "latest"
    ...
  },
  ...
}

API Docs

License

Note: this project provides front-end dependencies and uses licensed components listed in the next section; thus, licenses for those components are required during development. Contact Genesis Global for more details.

Licensed components

Genesis low-code platform

FAQs

Package last updated on 20 Jun 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts