How it works
What happens between clicking a button and landing back on your store signed in.
The sign-in flow
- A guest clicks Continue with …. The other buttons in the group are disabled and a screen-reader message says "Redirecting to …".
- The plugin's start URL (
/siteryn-social-login/start/{provider}/) checks that social login and the provider are enabled and that the visitor is not rate-limited, stores a one-time state, then sends the visitor to the provider. - The provider sends the visitor back to the callback URL (
/siteryn-social-login/callback/{provider}/). The plugin checks the state, exchanges the code for the account details on your server and finds the customer. - The customer is signed in (WordPress's own
wp_loginaction fires) and redirected (see Redirects).
How the customer is found
- Already linked: a customer who connected this provider account before is signed straight in.
- Same email, verified: if an account with the same email exists, the provider says the email is verified, Link existing accounts by verified email is on and the account is not a staff account, the customer is signed in and the provider is linked.
- Same email, not verified (or staff): sign-in stops with "An account with this email address already exists. Sign in with your password, then connect this provider from your account." The customer can then connect it from Linked accounts.
- No account: a new WooCommerce customer is created when New accounts allows it and the provider shared an email address. Otherwise sign-in stops with a message.
Staff accounts are users who can edit posts, manage WooCommerce, manage options or list users (administrators, shop managers, editors and similar). They are never matched by email.
Security
- OAuth 2.0 authorization-code flow with PKCE, and a one-time state bound to the visitor's browser (stored for 10 minutes, used once).
- Provider endpoints must be HTTPS and are requested through WordPress's HTTP API.
- Client secrets and private keys are write-only: after saving, the field shows "A secret is saved." and the value is never sent back to the browser.
- Sign-in attempts are rate-limited per IP address (20 starts in 10 minutes by default).
- Linking and unlinking are nonce-protected, and redirects only go to pages on your own site.
- The start and callback URLs are never cached and send
noindexheaders.
When something goes wrong
The customer returns to the page they started from (or My Account) with a WooCommerce error notice. Sign-ins started on wp-login.php show the message on the login screen instead.
- A WooCommerce error notice "Your sign-in attempt expired. Please try again." above the Login and Register forms
| Message | When |
|---|---|
| Social sign-in is not available right now. | Social login is turned off |
| That sign-in method is not available. | The provider is disabled or not fully configured |
| Your sign-in attempt expired. Please try again. | The one-time state is missing, used or older than 10 minutes |
| Please finish signing in using the same browser you started in. | The callback arrived in a different browser |
| Sign-in was cancelled. | The customer cancelled at the provider |
| The provider did not share an email address, which is needed to create your account. | No email and no existing link (for example X) |
| An account with this email address already exists. Sign in with your password, then connect this provider from your account. | Existing account that cannot be matched automatically |
| No account is linked to this sign-in, and new accounts cannot be created right now. | New accounts are not allowed |
| That account is already linked to a different customer account. | The provider account belongs to another customer |
| Too many sign-in attempts. Please wait a few minutes and try again. | Rate limit reached |
| This account cannot sign in this way. | Blocked by an extension (Pro's two-step guard has its own message) |
| You were signed out while connecting. Please sign in and try again. | Linking without a valid session |
| Your account could not be created. Please try again or register with the form. | Customer creation failed |
| Sign-in failed. Please try again. | Anything else |
Multilingual stores
With WPML or Polylang, the callback URL stays the same in every language. The shopper's language travels with the attempt and is restored on the callback, so notices and redirects use the right language. Text settings (heading and button label) are translatable through wpml-config.xml.