Security News
Cloudflare Adds Security.txt Setup Wizard
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
@slashid/docusaurus-theme-slashid
Advanced tools
The @slashid/docusaurus-theme-slashid
package extends Docusaurus to add authentication to docusaurus. The theme can be combined with docusaurus openapi docs to preload API keys and API parameters directly through SlashID attributes.
Key Features:
Theme:
# npm
npm install @slashid/slashid @slashid/react @slashid/docusaurus-theme-slashid
# yarn
yarn add @slashid/slashid @slashid/react @slashid/docusaurus-theme-slashid
docusaurus.config.js
Add the following to docusaurus.config.js
to start using the theme:
// docusaurus.config.js
{
...
themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
...
slashID: {
orgID: "your slash id org id",
oidcClientID: "optional OIDC client ID",
oidcProvider: "optional OIDC provider name",
forceLogin: "boolean flag to determine if login is required",
baseURL: "optional base API URL for the SDK, defaults to the production environment",
sdkURL: "optional base SDK page URL for the SDK, defaults to the production environment",
privatePaths: [
{
path: "a glob or a regex specifiying the path to protect",
groups: ["optional list of groups that can access the path"],
}
],
},
themes: ["@slashid/docusaurus-theme-slashid"],
}
}
Also please remember to include the login form styles:
// under presets
{
theme: {
customCss: [
require.resolve("./src/css/custom.scss"), // existing custom css
require.resolve("@slashid/react/style.css"), // add this line
],
}
}
The docusaurus-theme-slashid
theme can be configured with the following options:
Name | Type | Default | Description |
---|---|---|---|
slashID.orgID | string | null | The SlashID organization ID. |
slashID.oidcClientID | string | null | OIDC client ID. |
slashID.oidcProvider | string | null | OIDC provider name. |
slashID.forceLogin | boolean | false | Make login required. |
slashID.baseURL | boolean | false | Base API URL for the SDK, defaults to the production environment. |
slashID.sdkURL | boolean | false | Base SDK page URL for the SDK, defaults to the production environment. |
slashID.privatePaths | PrivatePath[] | undefined | Optional set of private paths. |
PrivatePath
A private path is a path that requires authentication to access. The slashID.privatePaths
option is an array of PrivatePath
objects.
interface PrivatePath {
path: string; // a glob or a regex specifiying the path to protect
groups?: string[]; // optional list of groups that can access the path
}
The theme can be configured at the page level using front matter to pass sidebar_custom_props
.
sidebar_custom_props:
slashid:
auth: true
groups:
- member
The above configuration will require the user to be authenticated and belong to the member
group to view the page.
groups
property is optional and if not specified, the user only needs to be authenticated to view the page.
Please read SUPPORT.md for details on how to get support for this project.
0.3.2 (Jan 18, 2024)
High level enhancements
FAQs
SlashID theme for Docusaurus.
The npm package @slashid/docusaurus-theme-slashid receives a total of 31 weekly downloads. As such, @slashid/docusaurus-theme-slashid popularity was classified as not popular.
We found that @slashid/docusaurus-theme-slashid demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 10 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
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
Security News
The Socket Research team breaks down a malicious npm package targeting the legitimate DOMPurify library. It uses obfuscated code to hide that it is exfiltrating browser and crypto wallet data.
Security News
ENISA’s 2024 report highlights the EU’s top cybersecurity threats, including rising DDoS attacks, ransomware, supply chain vulnerabilities, and weaponized AI.