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
<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.
<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.
Softsolz.setSession(sessionToken);Softsolz.logout();Prefer an iframe? Point it at the same screen:
<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
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_urlmust be anhttpslink, or empty to clear it. Anything else returns 400invalid_profile_picture_url.GET /users/{id}with an id that is not a whole number returns 400.GET /users?status=acceptspending,activeorsuspended. Deleted end-users are removed, so any other value returns 400invalid_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 inerror.details.reason. POST /password-resetsstill returns the token whensend_emailis false, withsent: falseandreason: email_not_sent. Other reasons areno_such_user,recently_sentandinvalid_email.
Webhook events
Subscribe to any of these on the Developers page:
customer-auth.user.created,.verified,.logged_incustomer-auth.user.password_reset_requested,.password_changedcustomer-auth.user.suspended,.reactivated,.deletedcustomer-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.