
Product
PHP and Composer Support Is Now in Beta
Socket’s PHP and Composer support is now in Beta for all customers, with PHP reachability analysis generally available.
@hellocoop/better-auth
Advanced tools
Better Auth plugin for Hellō - Add privacy-first authentication to your app in minutes.
npm install @hellocoop/better-auth better-auth
Visit console.hello.coop to create a free application and get your client_id.
import { betterAuth } from 'better-auth'
import { hellocoop } from '@hellocoop/better-auth'
export const auth = betterAuth({
plugins: [
hellocoop({
clientId: process.env.HELLO_CLIENT_ID,
// No client secret needed! Hellō uses PKCE
}),
],
})
import { createAuthClient } from 'better-auth/client'
import { hellocoopClient } from '@hellocoop/better-auth/client'
const authClient = createAuthClient({
plugins: [hellocoopClient()],
})
// Sign in with Hellō
await authClient.signIn.oauth2({
providerId: 'hellocoop',
callbackURL: '/dashboard',
})
hellocoop({
// Required: Your Hellō client ID
clientId: string
// Optional: Additional scopes beyond defaults
// Default: ["openid", "email", "name", "picture"]
scopes?: Scope[]
// Optional: Custom redirect URI
redirectURI?: string
// Optional: Default provider hint (can be overridden per sign-in)
// Examples: "github google", ["discord", "github"], "google--" (demote)
defaultProviderHint?: string | ProviderHint[]
// Optional: Default domain hint
// Examples: "hello.coop", "managed", "personal"
defaultDomainHint?: string
// Optional: Default login hint
// Examples: "user@example.com", "sub_01234567..."
defaultLoginHint?: string
// Optional: Default prompt value
// Examples: "login", "consent", "login consent"
defaultPrompt?: string
})
| Scope | Description |
|---|---|
openid | Required - returns sub (unique user ID) |
email | Verified email address |
name | Full/legal name |
nickname | Preferred name |
given_name | First name |
family_name | Last name |
phone | Verified phone number |
picture | Profile picture URL |
profile | Combines name, email, and picture |
preferred_username | Preferred username |
| Scope | Description |
|---|---|
github | Verified GitHub username and ID |
discord | Verified Discord username and ID |
gitlab | Verified GitLab username and ID |
twitter | Verified Twitter username and ID |
| Scope | Description |
|---|---|
ethereum | Verified Ethereum address |
profile_update | For incremental consent |
See Hellō Scopes Documentation for details.
hellocoop({
clientId: process.env.HELLO_CLIENT_ID,
scopes: ['openid', 'email', 'name', 'github', 'discord'],
})
Control which login providers are shown and in what order:
hellocoop({
clientId: process.env.HELLO_CLIENT_ID,
// Prefer GitHub and Google
defaultProviderHint: ['github', 'google'],
})
// Or demote a default provider
hellocoop({
clientId: process.env.HELLO_CLIENT_ID,
defaultProviderHint: 'google--', // Demote Google
})
Available providers: apple, discord, facebook, github, gitlab, google, twitch, twitter, tumblr, mastodon, microsoft, line, wordpress, yahoo, phone, ethereum, qrcode
Require specific account types:
hellocoop({
clientId: process.env.HELLO_CLIENT_ID,
defaultDomainHint: 'managed', // Require managed/enterprise accounts
})
// Or require personal accounts
hellocoop({
clientId: process.env.HELLO_CLIENT_ID,
defaultDomainHint: 'personal',
})
// Or specify a domain
hellocoop({
clientId: process.env.HELLO_CLIENT_ID,
defaultDomainHint: 'hello.coop',
})
Suggest which account to use:
hellocoop({
clientId: process.env.HELLO_CLIENT_ID,
defaultLoginHint: 'user@example.com',
})
Control re-authentication and consent:
hellocoop({
clientId: process.env.HELLO_CLIENT_ID,
// Require re-authentication
defaultPrompt: 'login',
})
// Or require consent review
hellocoop({
clientId: process.env.HELLO_CLIENT_ID,
defaultPrompt: 'consent',
})
// Or both
hellocoop({
clientId: process.env.HELLO_CLIENT_ID,
defaultPrompt: 'login consent',
})
import { createAuthClient } from 'better-auth/client'
import { hellocoopClient } from '@hellocoop/better-auth/client'
const authClient = createAuthClient({
plugins: [hellocoopClient()],
})
// Standard OAuth2 sign-in
await authClient.signIn.oauth2({
providerId: 'hellocoop',
callbackURL: '/dashboard',
})
// Override defaults per sign-in
await authClient.hello.signIn({
providerHint: 'discord',
domainHint: 'personal',
loginHint: 'user@example.com',
prompt: 'login consent',
callbackURL: '/dashboard',
})
// Direct sign-in with a specific provider
await authClient.hello.signInWith('github', {
callbackURL: '/dashboard',
})
import { HELLO_SCOPES, HELLO_PROVIDERS } from '@hellocoop/better-auth/client'
// Use constants for type safety
await authClient.hello.signIn({
providerHint: HELLO_PROVIDERS.GITHUB,
scopes: [HELLO_SCOPES.EMAIL, HELLO_SCOPES.GITHUB],
callbackURL: '/dashboard',
})
The plugin automatically maps Hellō claims to the Better Auth user model:
{
id: string // sub
email: string // email (always verified)
emailVerified: boolean // true
name: string // name
image: string // picture
nickname?: string // nickname
preferredUsername?: string // preferred_username
givenName?: string // given_name
familyName?: string // family_name
phone?: string // phone
phoneVerified?: boolean // phone_verified
// Social accounts (if requested)
github?: { id: string, username: string }
discord?: { id: string, username: string }
gitlab?: { id: string, username: string }
twitter?: { id: string, username: string }
// Other
ethereum?: string
org?: { id: string, domain: string }
}
Hellō supports OpenID Connect Third Party Initiated Login for features like invitations.
Your application needs to handle the initiate_login_uri endpoint that receives:
iss - Hellō issuer (https://issuer.hello.coop)login_hint - Optional email or user subdomain_hint - Optional domain requirementtarget_link_uri - Optional target after authenticationRefer to the Hellō Invite API documentation for details.
MIT
FAQs
Better Auth plugin for Hellō - https://hello.dev
The npm package @hellocoop/better-auth receives a total of 0 weekly downloads. As such, @hellocoop/better-auth popularity was classified as not popular.
We found that @hellocoop/better-auth demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.

Product
Socket’s PHP and Composer support is now in Beta for all customers, with PHP reachability analysis generally available.

Product
Socket is bringing experimental protection to Firefox, scanning 97,000+ extensions in Mozilla's official directory for malware and risky updates.

Research
/Security News
Three compromised Rust crates pulled in a malicious dependency that downloaded and executed cross-platform malware during Cargo builds.