Security News
Research
Supply Chain Attack on Rspack npm Packages Injects Cryptojacking Malware
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
@frontegg/rest-api
Advanced tools
The APIs and states are available by using the using the frontegg rest-api are exposed via promises and interfaces such as the below:
import { someApi } from "@frontegg/rest-api";
await someApi();
import { preLogin } from '@frontegg/rest-api';
const redirectUrl = await preLogin({ email: 'john@doe.com' });
if (redirectUrl) {
// Redirect to SSO
}
Returns if the user needs to be redirected to SSO based on email domain
import { login } from '@frontegg/rest-api';
const loginResponse: {
accessToken: string;
refreshToken: string;
expires: string;
expiresIn: number;
mfaRequired: boolean;
mfaToken?: string; // for multi-factor authentication
emailVerified?: boolean;
} = await login({ email, password });
Logs in the user using email and password and returns the JWT and refresh token.In case MFA is required the MFA token will be returned
import { loginWithMfa } from '@frontegg/rest-api';
const loginResponse: {
accessToken: string;
refreshToken: string;
expires: string;
expiresIn: number;
mfaRequired: boolean;
mfaToken?: string; // for multi-factor authentication
emailVerified?: boolean;
} = await loginWithMfa({ mfaToken, value });
Verifies the login using MFA token and value and gets the JWT token and the refresh token back
import { activateAccount } from '@frontegg/rest-api';
await activateAccount({ userId, token, password });
Activates the users' account using the user ID, the token and the users' new password
import { acceptInvitation } from '@frontegg/rest-api';
await acceptInvitation({ userId, token });
Accepts invitation of user to a new tenant and makes the user as active on that tenant
import { refreshToken } from '@frontegg/rest-api';
const loginResponse: {
accessToken: string;
refreshToken: string;
expires: string;
expiresIn: number;
mfaRequired: boolean;
mfaToken?: string; // for multi-factor authentication
emailVerified?: boolean;
} = await refreshToken();
Refresh the current user authentication
import { logout } from '@frontegg/rest-api';
await logout();
Logs out the user and clears the refresh token
import { logout } from '@frontegg/rest-api';
await logout();
Logs out the user and clears the refresh token
import { resetPassword } from '@frontegg/rest-api';
await logout({
token,
userId,
password
});
Resets password based on token received from the forgot password flow
Allows the user to recover the MFA token
import { recoverMfaToken } from '@frontegg/rest-api';
await recoverMfaToken({
email,
recoveryCode
});
FAQs
Unknown package
The npm package @frontegg/rest-api receives a total of 28,621 weekly downloads. As such, @frontegg/rest-api popularity was classified as popular.
We found that @frontegg/rest-api demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
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.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.
Security News
Sonar’s acquisition of Tidelift highlights a growing industry shift toward sustainable open source funding, addressing maintainer burnout and critical software dependencies.