Help us shape the future of Go! Take the 2026 Go Developer Survey

plugins/

directory
v1.9.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 2, 2026 License: MIT

README

Plugins

Authsome ships 27 plugins. The core engine handles users, sessions, devices and RBAC; every authentication method and every policy control is a plugin you register explicitly. Nothing here is on by default, so you only carry what you use.

engine, err := authsome.NewEngine(
    authsome.WithStore(store),
    authsome.WithPlugin(password.New()),
    authsome.WithPlugin(mfa.New(mfa.Config{Issuer: "My App"})),
)

Each plugin has its own README with config, settings, endpoints and the hooks it runs on, except retention, which is documented in its package comment (go doc github.com/xraph/authsome/plugins/retention).

Pick by what you are trying to do

You want Use
Classic email and password sign-in password
Sign in with Google, GitHub, Apple social
Passwordless over email magiclink
Face ID, Touch ID, YubiKey passkey
Phone number and an SMS code phone
A second factor on top of a password mfa
Credentials for scripts and CI apikey
Enterprise SSO against Okta or Entra sso
To be the OAuth2 provider others sign in with oauth2provider
Companies as customers, not just people organization
Automated user provisioning and offboarding scim
To charge for the product subscription
Proof of GDPR consent consent
A pre-launch signup queue waitlist
Auth emails, quickly email
Localised, multi-channel messages notification
To block whole countries geofence
To block Tor and anonymising proxies vpndetect
To block known-bad IPs ipreputation
To catch account takeover across continents impossibletravel
Behavioural detection on login patterns anomaly
A challenge when a new device appears deviceverify
One risk score instead of five separate blocks riskengine
Compromise signals pushed from Google or Okta sharedsignals
To let an AI agent act for a user, on a leash agentauth
Country and city on every session geoip
Sign-ups, sign-ins and profile updates mirrored into a CRM (HubSpot or a generic REST endpoint) retention

By category

Category Plugins
Authentication password, social, magiclink, passkey, mfa, apikey, sso, phone
Identity organization, consent, subscription, waitlist
Communication email, notification
Risk and security anomaly, geofence, geoip, impossibletravel, ipreputation, riskengine, vpndetect, sharedsignals
Provisioning scim, deviceverify, oauth2provider, agentauth
Data retention

What depends on what

Most plugins stand alone. These do not, and registration order matters where it says so.

  • geofence, vpndetect and impossibletravel read the location that geoip resolves. Register geoip first or they have nothing to work with.
  • anomaly uses geoip for its new-country signal, and degrades quietly without it.
  • sharedsignals implements riskengine.RiskContributor. Its signals are stored either way, but nothing acts on them unless riskengine is registered.
  • riskengine finds contributors automatically at init, so you rarely pass them by hand.
  • sso and scim scope their connections to an organisation, which means organization.
  • subscription in organisation mode needs organization for its tenants.
  • phone and mfa share the engine's SMS bridge. Configure it once.
  • waitlist contributes notification mappings that notification renders.
  • retention can gate CRM delivery on a consent grant, which needs consent registered and retention.require_consent turned on. Without them every user syncs.
  • agentauth plugs its consent gate into oauth2provider, automatically when both are registered on the same engine. Its org policy surface needs organization.

Pick one of email or notification, not both. They hook the same events and you will send every message twice.

How a plugin decides things

Two mechanisms, and the difference matters when you are debugging.

Config is passed at construction and fixed for the life of the process. settings are dynamic: they are declared with settings.Define, scoped global or per-app, and changeable at runtime from the admin dashboard or the settings API. Where a plugin has both, the setting is what actually applies. Every plugin README lists both tables.

Plugins also declare their lifecycle hooks as compile-time assertions:

var (
    _ plugin.Plugin        = (*Plugin)(nil)
    _ plugin.BeforeSignUp  = (*Plugin)(nil)
    _ plugin.RouteProvider = (*Plugin)(nil)
)

That block at the top of any plugin.go is the fastest answer to "when does this thing run".

Writing your own

See docs/content/docs/plugins/creating-plugins.mdx. The interfaces you can implement are in plugin/plugin.go.

Directories

Path Synopsis
Package agentauth: see doc.go for the package doc comment and the host integration contract.
Package agentauth: see doc.go for the package doc comment and the host integration contract.
contract.go: Wires the anomaly plugin into the forge-dashboard contract surface via plugin.ContractContributor.
contract.go: Wires the anomaly plugin into the forge-dashboard contract surface via plugin.ContractContributor.
contract
Package contract wires the anomaly plugin's deep-link settings page into the forge-dashboard contract registry.
Package contract wires the anomaly plugin's deep-link settings page into the forge-dashboard contract registry.
contract.go: Wires the apikey plugin into the forge-dashboard contract surface via plugin.ContractContributor.
contract.go: Wires the apikey plugin into the forge-dashboard contract surface via plugin.ContractContributor.
contract
Package contract wires the apikey plugin's intent surface into the forge-dashboard contract registry.
Package contract wires the apikey plugin's intent surface into the forge-dashboard contract registry.
contract.go: Wires the consent plugin into the forge-dashboard contract surface via plugin.ContractContributor.
contract.go: Wires the consent plugin into the forge-dashboard contract surface via plugin.ContractContributor.
consenttest
Package consenttest provides a backend-agnostic conformance suite for the consent.Store interface.
Package consenttest provides a backend-agnostic conformance suite for the consent.Store interface.
contract
Package contract is the consent plugin's forge-dashboard contract surface.
Package contract is the consent plugin's forge-dashboard contract surface.
contract.go: Wires the deviceverify plugin into the forge-dashboard contract surface via plugin.ContractContributor.
contract.go: Wires the deviceverify plugin into the forge-dashboard contract surface via plugin.ContractContributor.
contract
Package contract wires the deviceverify plugin's deep-link settings page into the forge-dashboard contract registry.
Package contract wires the deviceverify plugin's deep-link settings page into the forge-dashboard contract registry.
contract.go: Wires the email plugin into the forge-dashboard contract surface.
contract.go: Wires the email plugin into the forge-dashboard contract surface.
contract
Package contract wires the email plugin's deep-link settings page into the forge-dashboard contract registry.
Package contract wires the email plugin's deep-link settings page into the forge-dashboard contract registry.
contract.go: Wires the geofence plugin into the forge-dashboard contract surface via plugin.ContractContributor.
contract.go: Wires the geofence plugin into the forge-dashboard contract surface via plugin.ContractContributor.
contract
Package contract wires the geofence plugin's deep-link settings page into the forge-dashboard contract registry.
Package contract wires the geofence plugin's deep-link settings page into the forge-dashboard contract registry.
contract.go: Wires the geoip plugin into the forge-dashboard contract surface via plugin.ContractContributor.
contract.go: Wires the geoip plugin into the forge-dashboard contract surface via plugin.ContractContributor.
contract
Package contract wires the geoip plugin's deep-link settings page into the forge-dashboard contract registry.
Package contract wires the geoip plugin's deep-link settings page into the forge-dashboard contract registry.
contract.go: Wires the impossibletravel plugin into the forge-dashboard contract surface via plugin.ContractContributor.
contract.go: Wires the impossibletravel plugin into the forge-dashboard contract surface via plugin.ContractContributor.
contract
Package contract wires the impossibletravel plugin's deep-link settings page into the forge-dashboard contract registry.
Package contract wires the impossibletravel plugin's deep-link settings page into the forge-dashboard contract registry.
contract.go: Wires the ipreputation plugin into the forge-dashboard contract surface via plugin.ContractContributor.
contract.go: Wires the ipreputation plugin into the forge-dashboard contract surface via plugin.ContractContributor.
contract
Package contract wires the ipreputation plugin's deep-link settings page into the forge-dashboard contract registry.
Package contract wires the ipreputation plugin's deep-link settings page into the forge-dashboard contract registry.
contract.go: Wires the magiclink plugin into the forge-dashboard contract surface via plugin.ContractContributor.
contract.go: Wires the magiclink plugin into the forge-dashboard contract surface via plugin.ContractContributor.
contract
Package contract wires the magiclink plugin's deep-link settings page into the forge-dashboard contract registry.
Package contract wires the magiclink plugin's deep-link settings page into the forge-dashboard contract registry.
mfa
contract.go: Wires the mfa plugin into the forge-dashboard contract surface via plugin.ContractContributor.
contract.go: Wires the mfa plugin into the forge-dashboard contract surface via plugin.ContractContributor.
contract
Package contract wires the mfa plugin's deep-link settings page into the forge-dashboard contract registry.
Package contract wires the mfa plugin's deep-link settings page into the forge-dashboard contract registry.
mfatest
Package mfatest provides a backend-agnostic conformance suite for the mfa.Store interface.
Package mfatest provides a backend-agnostic conformance suite for the mfa.Store interface.
Package notification provides a Herald-backed notification plugin for AuthSome.
Package notification provides a Herald-backed notification plugin for AuthSome.
contract
Package contract wires the notification plugin's deep-link settings page into the forge-dashboard contract registry.
Package contract wires the notification plugin's deep-link settings page into the forge-dashboard contract registry.
admin_clients.go: the admin surface for editing an OAuth2 client that already exists.
admin_clients.go: the admin surface for editing an OAuth2 client that already exists.
contract
Package contract wires the oauth2provider plugin's deep-link settings page into the forge-dashboard contract registry.
Package contract wires the oauth2provider plugin's deep-link settings page into the forge-dashboard contract registry.
oauth2test
Package oauth2test provides a backend-agnostic conformance suite for the oauth2provider.Store interface.
Package oauth2test provides a backend-agnostic conformance suite for the oauth2provider.Store interface.
contract.go: Wires the organization plugin into the forge-dashboard contract surface via plugin.ContractContributor.
contract.go: Wires the organization plugin into the forge-dashboard contract surface via plugin.ContractContributor.
contract
Package contract wires the organization plugin's intent surface into the forge-dashboard contract registry.
Package contract wires the organization plugin's intent surface into the forge-dashboard contract registry.
contract.go: Wires the passkey plugin into the forge-dashboard contract surface via plugin.ContractContributor.
contract.go: Wires the passkey plugin into the forge-dashboard contract surface via plugin.ContractContributor.
contract
Package contract wires the passkey plugin's deep-link settings page into the forge-dashboard contract registry.
Package contract wires the passkey plugin's deep-link settings page into the forge-dashboard contract registry.
passkeytest
Package passkeytest provides a backend-agnostic conformance suite for the passkey.Store interface.
Package passkeytest provides a backend-agnostic conformance suite for the passkey.Store interface.
contract.go: Wires the password plugin into the forge-dashboard contract surface.
contract.go: Wires the password plugin into the forge-dashboard contract surface.
contract
Package contract registers the password plugin's forge-dashboard contract surface: three intents (password.settings, password.policy, password.settingsUpdate) backed by the settings.Manager, plus a standalone /auth/password page that extends the auth contributor's /settings page with a password-policy panel.
Package contract registers the password plugin's forge-dashboard contract surface: three intents (password.settings, password.policy, password.settingsUpdate) backed by the settings.Manager, plus a standalone /auth/password page that extends the auth contributor's /settings page with a password-policy panel.
contract.go: Wires the phone plugin into the forge-dashboard contract surface via plugin.ContractContributor.
contract.go: Wires the phone plugin into the forge-dashboard contract surface via plugin.ContractContributor.
contract
Package contract wires the phone plugin's deep-link settings page into the forge-dashboard contract registry.
Package contract wires the phone plugin's deep-link settings page into the forge-dashboard contract registry.
Package retention mirrors authsome auth activity into a CRM.
Package retention mirrors authsome auth activity into a CRM.
contract.go: Wires the riskengine plugin into the forge-dashboard contract surface via plugin.ContractContributor.
contract.go: Wires the riskengine plugin into the forge-dashboard contract surface via plugin.ContractContributor.
contract
Package contract wires the riskengine plugin's deep-link settings page into the forge-dashboard contract registry.
Package contract wires the riskengine plugin's deep-link settings page into the forge-dashboard contract registry.
contract.go: Wires the scim plugin into the forge-dashboard contract surface via plugin.ContractContributor.
contract.go: Wires the scim plugin into the forge-dashboard contract surface via plugin.ContractContributor.
contract
Package contract wires the scim plugin's deep-link settings page into the forge-dashboard contract registry.
Package contract wires the scim plugin's deep-link settings page into the forge-dashboard contract registry.
scimtest
Package scimtest is the store contract every SCIM store implementation must satisfy.
Package scimtest is the store contract every SCIM store implementation must satisfy.
Package sharedsignals implements the OpenID Shared Signals Framework and CAEP.
Package sharedsignals implements the OpenID Shared Signals Framework and CAEP.
caep
Package caep implements the OpenID CAEP event types and the RFC 9493 subject identifiers they carry.
Package caep implements the OpenID CAEP event types and the RFC 9493 subject identifiers they carry.
jwksclient
Package jwksclient fetches and caches JSON Web Key Sets for inbound token verification.
Package jwksclient fetches and caches JSON Web Key Sets for inbound token verification.
setjwt
Package setjwt parses and validates RFC 8417 Security Event Tokens.
Package setjwt parses and validates RFC 8417 Security Event Tokens.
ssftest
Package ssftest provides a backend-agnostic conformance suite for the sharedsignals.Store interface.
Package ssftest provides a backend-agnostic conformance suite for the sharedsignals.Store interface.
contract.go: Wires the social plugin into the forge-dashboard contract surface via plugin.ContractContributor.
contract.go: Wires the social plugin into the forge-dashboard contract surface via plugin.ContractContributor.
contract
Package contract wires the social plugin's deep-link settings page into the forge-dashboard contract registry.
Package contract wires the social plugin's deep-link settings page into the forge-dashboard contract registry.
socialtest
Package socialtest provides a backend-agnostic conformance suite for the social.Store interface.
Package socialtest provides a backend-agnostic conformance suite for the social.Store interface.
sso
contract.go: Wires the sso plugin into the forge-dashboard contract surface via plugin.ContractContributor.
contract.go: Wires the sso plugin into the forge-dashboard contract surface via plugin.ContractContributor.
contract
Package contract wires the sso plugin's deep-link settings page into the forge-dashboard contract registry.
Package contract wires the sso plugin's deep-link settings page into the forge-dashboard contract registry.
ssotest
Package ssotest provides a backend-agnostic conformance suite for the sso.Store interface.
Package ssotest provides a backend-agnostic conformance suite for the sso.Store interface.
contract.go: Wires the subscription plugin into the forge-dashboard contract surface via plugin.ContractContributor.
contract.go: Wires the subscription plugin into the forge-dashboard contract surface via plugin.ContractContributor.
contract
Package contract wires the subscription plugin's intent surface into the forge-dashboard contract registry.
Package contract wires the subscription plugin's intent surface into the forge-dashboard contract registry.
contract.go: Wires the vpndetect plugin into the forge-dashboard contract surface via plugin.ContractContributor.
contract.go: Wires the vpndetect plugin into the forge-dashboard contract surface via plugin.ContractContributor.
contract
Package contract wires the vpndetect plugin's deep-link settings page into the forge-dashboard contract registry.
Package contract wires the vpndetect plugin's deep-link settings page into the forge-dashboard contract registry.
contract.go: Wires the waitlist plugin into the forge-dashboard contract surface via plugin.ContractContributor.
contract.go: Wires the waitlist plugin into the forge-dashboard contract surface via plugin.ContractContributor.
contract
Package contract is the waitlist plugin's forge-dashboard contract surface.
Package contract is the waitlist plugin's forge-dashboard contract surface.
waitlisttest
Package waitlisttest provides a backend-agnostic conformance suite for the waitlist.Store interface.
Package waitlisttest provides a backend-agnostic conformance suite for the waitlist.Store interface.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL