Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
@sanity/default-login
Advanced tools
Readme
This package is part of Sanity Studio v2, which has been superseded by Sanity Studio v3, the current major version released on Dec 7th, 2022. This package is no longer used/needed for Sanity Studio in its current version and will be retired on Dec 7th, 2023. The core packages for Sanity Studio v2 will only receive critical bug fixes until this date.
Please head over to the documentation for Sanity Studio v3 to learn more.
Let a user log into Sanity, and get access to the child content.
By default this component will ask the Sanity API and get a list of providers, which the user can login with.
However it is possible for enterprise customers to supply their own third party authentication server as a provider as well.
This is done through configuring the studio with the file ./config/@sanity/default-login.json
Example:
{
"providers": {
// Append the custom providers to the default providers or replace them.
"mode": "append", // default - or 'replace'
// If true, don't show the choose provider logo screen,
// automatically redirect to the single provider login
"redirectOnSingle": false // default
// The custom provider implementations
"entries": [
{
"name": "vandelay",
"title": "Vandelay Industries",
"url": "https://api.vandelay.industries/login",
"logo": "/static/img/vandelay.svg" // Optional, put it in the studio static folder
}
]
},
// Login method to use for the studio the studio. Can be one of:
// `dual` (default) - attempt to use cookies where possible, falling back to storing authentication token in `localStorage` otherwise
// `cookie` - explicitly disable `localStorage` method, relying only on cookies
"loginMethod": "dual"
}
<LoginWrapper>
{user => <Layout><div>{user.name} is logged in!</div></Layout>}
</LoginWrapper>
static propTypes = {
children: PropTypes.oneOfType([
PropTypes.node,
PropTypes.func
]).isRequired,
title: PropTypes.string,
description: PropTypes.string,
SanityLogo: PropTypes.func
}
static defaultProps = {
title: 'Choose login provider',
description: null,
SanityLogo: SanityStudioLogo,
}
FAQs
Lets the user log in to Sanity.
The npm package @sanity/default-login receives a total of 11,616 weekly downloads. As such, @sanity/default-login popularity was classified as popular.
We found that @sanity/default-login demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 39 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
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.