
Security News
Nx npm Packages Compromised in Supply Chain Attack Weaponizing AI CLI Tools
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.
@sensenet/authentication-google
Advanced tools
Client-side Google authentication provider for sensenet
This package contains a client-side Google Oauth2 authentication provider for sensenet.
# Yarn
yarn add @sensenet/authentication-google
# NPM
npm install @sensenet/authentication-google
You can set up the Provider after creating your repository singleton with the addGoogleAuth method
import { Repository } from '@sensenet/client-core'
import { JwtService } from '@sensenet/authentication-jwt'
import { addGoogleAuth } from '@sensenet/authentication-google'
const repo = new Repository()
const jwt = new JwtService(repo)
const googleOauthProvider = addGoogleAuth(jwt, { clientId: '' })
In your login component, you can use the following snippet. If you don't provide an id_token from an external component, the package will try to retrieve it using a popup window (in that case you have to enable popups and add a callback pointing to your window's origin)
// an example login method with an optional idToken:
async Login(idToken?: string){
try {
await googleOauthProvider.login(idToken);
console.log('Logged in');
} catch (error) {
console.warn('Error during login', error);
}
}
FAQs
Client-side Google authentication provider for sensenet
The npm package @sensenet/authentication-google receives a total of 7 weekly downloads. As such, @sensenet/authentication-google popularity was classified as not popular.
We found that @sensenet/authentication-google demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 6 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
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.
Security News
CISA’s 2025 draft SBOM guidance adds new fields like hashes, licenses, and tool metadata to make software inventories more actionable.
Security News
A clarification on our recent research investigating 60 malicious Ruby gems.