This NPM package contains a client-side JWT authentication service implementation for sensenet.
npm install @sensenet/authentication-jwt
Setup and usage
You can use JWT authentication with a preconfigured sensenet >7.0.0 backend.
Login / logout:
You can log in and out using the following API endpoints:
State and user changes
You can subscribe to authentication state and current user changes using the following two observable values:
Please note that if you want to send custom authenticated requests to the content repository, always use the
repository.fetch(...) method. This ensures that your access token will be renewed if needed and your authentication state will consistent.