New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@genesislcap/foundation-user

Package Overview
Dependencies
Maintainers
0
Versions
586
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@genesislcap/foundation-user

Genesis User

  • 14.234.2-FUI-2287.1
  • FUI-2287
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3K
increased by86.49%
Maintainers
0
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.

  1. 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 22 Jan 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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc