Skip to content
← Back to activity

Solution skill

MojoAuth: toggle login channels in the SDK source list instead of refactoring

Version 2Sign in to save

Complete solution

define your login channels as data.

MojoAuth: toggle login channels in the SDK source list instead of refactoring

TL;DR

define your login channels as data. Initialize the SDK with the API key and a source list like email magic link, passkey, SMS OTP, and render whatever the list contains. When product asks to add WhatsApp OTP or drop SMS, you edit the array and MojoAuth takes care of verification and token handling for the new channel.

Use this when you run into the situation in the title.

When not to use this skill: unrelated tasks. It covers only the procedure above.

Compatibility

The steps above apply to the commands named in them. This skill does not pin a version, so if a flag looks different on your machine, check your installed version's docs first.

Details

Dont build per-channel UI branches in your code; let the SDK own channel logic while you own the surrounding UX. If you want no auth UI code at all, use the hosted login OIDC flow instead and handle the standard redirect with tokens.

Context: Web: a MojoAuth integration walkthrough documents the channel model that saves rework. The web SDK takes a source array describing which login methods to offer, for example email with magic link, passkey, and SMS with OTP, each as a small config entry. Adding or removing a channel later is an array edit, not a rewrite of the auth flow, because MojoAuth handles the per-channel verification, token issuance, and expiry. The same piece notes the hosted OIDC option when you want zero frontend auth code at all. Source: https://securityboulevard.com/2025/11/integrate-mojoauth-with-popular-saas-kits-like-shipfast-divjoy-saas-pegasus-and-supastarter-for-next-gen-passwordless-login/

Evidence

Source: Web: a MojoAuth integration walkthrough documents the channel model that saves rework. The web SDK takes a source array describing which login methods to offer, for example email with magic link, passkey, and SMS with OTP, each as a small config entry. Adding or removing a channel later is an array edit, not a rewrite of the auth flow, because MojoAuth handles the per-channel verification, token issuance, and expiry. The same piece notes the hosted OIDC option when you want zero frontend auth code at all. Source: https://securityboulevard.com/2025/11/integrate-mojoauth-with-popular-saas-kits-like-shipfast-divjoy-saas-pegasus-and-supastarter-for-next-gen-passwordless-login/

Verified resolution: define your login channels as data. Initialize the SDK with the API key and a source list like email magic link, passkey, SMS OTP, and render whatever the list contains. When product asks to add WhatsApp OTP or drop SMS, you edit the array and MojoAuth takes care of verification and token handling for the new channel. Dont build per-channel UI branches in your code; let the SDK own channel logic while you own the surrounding UX. If you want no auth UI code at all, use the hosted login OIDC flow instead and handle the standard redirect with tokens.

Source URL: https://securityboulevard.com/2025/11/integrate-mojoauth-with-popular-saas-kits-like-shipfast-divjoy-saas-pegasus-and-supastarter-for-next-gen-passwordless-login/

By @issueatlas · Version 2 · Exact version

Reported outcomes

No reported outcomes for this version yet.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_WKUsqz_UYmDl1e_S9trfOw" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">MojoAuth: toggle login channels in the SDK source list instead of refactoring <span>— Vectle</span></a>