SoftSolzSoftSolz
HomeAPI GuideAPI ReferenceWidget Tester

Customer Auth

Drop-in signup, login and profile widgets for your own app.

Add authentication for your app’s own end-users without building it yourself. Embed the sign-in widget, then add the profile, two-factor and sign-out widgets wherever they belong on your site - all sharing one key.

Embed the sign-in widget

html
<script src="https://app.softsolz.uk/softsolz.js"
data-public-key="pk_live_your_key"
data-service-id="customer-auth"></script>

Add the other screens

One script tag per screen. data-view picks the screen: auth (sign in and sign up, the default), profile, mfa (two-step sign-in setup) or logout. data-redirect is the page to open after sign-in.

html
<script src="https://app.softsolz.uk/softsolz.js"
data-public-key="pk_live_your_key"
data-service-id="customer-auth"
data-view="profile"></script>
<script src="https://app.softsolz.uk/softsolz.js"
data-public-key="pk_live_your_key"
data-service-id="customer-auth"
data-view="mfa"></script>
<script src="https://app.softsolz.uk/softsolz.js"
data-public-key="pk_live_your_key"
data-service-id="customer-auth"
data-view="logout"></script>

If your own server signs people in, hand the session token to the widgets with Softsolz.setSession(sessionToken), and end it with Softsolz.logout(). You can also use data-session-token on the script tag.

js
Softsolz.setSession(sessionToken);
Softsolz.logout();

Prefer an iframe? Point it at the same screen:

html
<iframe src="https://app.softsolz.uk/embed/services/customer-auth?pk=pk_live_your_key&view=auth"
title="Sign in" width="100%" height="560" style="border:0"></iframe>

Widget keys and allowed websites

A public key only works on the websites you list as allowed in your dashboard. A key can never allow the origin null. If the website is not on the list, the widget says so instead of failing silently. The two-step sign-in code in an authenticator app shows your business name.

Manage end-users from your server

bash
curl https://app.softsolz.uk/api/v1/services/customer-auth/users \
-H "Authorization: Bearer sk_live_your_key"

Rules the API checks

  • Create and update report every bad field at once in error.details.fields. Unknown fields are rejected and names longer than 200 characters are refused.
  • profile_picture_url must be an https link, or empty to clear it. Anything else returns 400 invalid_profile_picture_url.
  • GET /users/{id} with an id that is not a whole number returns 400.
  • GET /users?status= accepts pending, active or suspended. Deleted end-users are removed, so any other value returns 400 invalid_status_filter.
  • Passwords sent through the API must be 8 to 256 characters. The sign-up widget applies its own password rules.
  • Verifying or revoking a session that is not valid returns 401 with code session_invalid; the reason is in error.details.reason.
  • POST /password-resets still returns the token when send_email is false, with sent: false and reason: email_not_sent. Other reasons are no_such_user, recently_sent and invalid_email.

Webhook events

Subscribe to any of these on the Developers page:

  • customer-auth.user.created, .verified, .logged_in
  • customer-auth.user.password_reset_requested, .password_changed
  • customer-auth.user.suspended, .reactivated, .deleted
  • customer-auth.user.profile_updated, .mfa_enabled, .mfa_disabled

Next

Browse every endpoint in the API Reference, or read the product walkthrough on docs.softsolz.uk.