Auto login and token exchange
Auto Login turns a token from your backend into a signed-in Genuin member, so someone signed in to your site or app is signed in to Genuin without a second login and without Genuin seeing your credentials. The sequence, the token contract, and session refresh are explained in How Auto Login works; signing out and expired sessions are in Sign members out and handle expired sessions.
Pass the token
| Platform | Call |
|---|---|
| Web | window.genuin.init({ embed_id, api_key, token: "{{SSO_TOKEN}}", params: { name, email, mobile, nickname, profileImage } }) |
| iOS | GenuinSDK.shared.ssoLogin(ssoToken: "{{SSO_TOKEN}}", params: params) { success in } |
| Android | GenuinSDK.ssoLogin(context = this, ssoToken = "{{SSO_TOKEN}}", params = params) { isSuccess -> } |
| React Native | import { ssoLogin } from 'genuin-react-native'; ssoLogin('{{SSO_TOKEN}}', { name, email }), or the ssoToken prop on the embed |
| Flutter | GenuinSdk().ssoLogin('{{SSO_TOKEN}}') once for the whole app |
| Any embed | ssoToken / setSSOToken on the embed itself; skip the separate call |
Sign out – GenuinSDK.shared.ssoLogout() on iOS, GenuinSDK.ssoLogout(context) on Android, ssoLogout() in React Native and Flutter; the SDKs call POST /api/v4/auth/signout for you.
Let the SDK ask your app to sign in – implement GenuinDelegate.presentLoginViewController(baseViewController:) on iOS or GenuinInterface.onLogin(context) on Android, or define window.genuinAuth on the web, then call ssoLogin after your own login succeeds.
Choose the method – Genuin sign-in, single sign-on through your identity provider (see Set up single sign-on with your identity provider), or Auto Login: Choose how members sign in to the Genuin SDK compares them.
API & SDK
Access: the calls in the table are the proposed Business Account API (see Business Account API: provisioning, OAuth, and the resource map), authenticated with a key scoped to the account and a role or an OAuth client acting for it; every confirmation in this article becomes a proposal you can approve by API (POST /proposals/{proposalId}:approve). Live today, the server API under /api/thirdparty authenticates with a gn-access-token (see Generate an access token), and Live API today and the Business Account API roadmap maps what is live to what is proposed.
| Call | Purpose |
|---|---|
| POST /sessions | Auto login token exchange: your signed user token for a Genuin session |
| PUT /brands/{brandId}/auth | Auto login provider, claims passed, consent behaviour, member-only communities |
// proposed server SDK (Business Account API)
import { Genuin } from '@genuin/sdk';
const genuin = new Genuin({ apiKey: process.env.GENUIN_KEY });
await genuin.sessions.create({ token });
await genuin.auth.update(brandId, { provider: 'okta', claims: ['hashed_email'] });Live today: Add members to a community · How Auto Login works · Update a group and its members.
SDKs: Web SDK 2.0.6 (see Embed the Genuin Web SDK on your website), iOS SDK 2.1.5 (see Integrate the Genuin iOS SDK), Android SDK 2.1.5 (see Integrate the Genuin Android SDK), React Native 3.0.3 (see Integrate the Genuin SDK with React Native apps), and Flutter (see Integrate the Genuin SDK with Flutter apps) render Genuin and sign members in; the Node (@genuin/sdk) and Python (genuin) server SDKs are proposed with Business Account API: provisioning, OAuth, and the resource map.

