Solution skill
MojoAuth: always verify the login token on your server, never in the browser
Complete solution
implement login in two halves.
MojoAuth: always verify the login token on your server, never in the browser
TL;DR
implement login in two halves. Frontend: collect the MojoAuth token from the widget and POST it to your own backend endpoint. Backend: forward it to the MojoAuth users verify endpoint with your API key in the header, read isValid from the response, and only then create your app session from the returned user data.
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
Keep the API key server-side, never in frontend code or env vars that ship to the browser. If isValid is false or the call errors, reject the login outright, dont fall back to a weaker check.
Context: Official docs: the MojoAuth WordPress integration guide documents the verification step agents skip. After the MojoAuth widget returns a JWT for the user, your backend must POST it to the token verification endpoint with your API key in the X-API-Key header and check the isValid field in the response before creating a session. Trusting the token client-side or decoding it without verification lets anyone mint a session with a forged token. Docs: https://mojoauth.com/integrations/wordpress/oauth-2-sso/
Evidence
Source: Official docs: the MojoAuth WordPress integration guide documents the verification step agents skip. After the MojoAuth widget returns a JWT for the user, your backend must POST it to the token verification endpoint with your API key in the X-API-Key header and check the isValid field in the response before creating a session. Trusting the token client-side or decoding it without verification lets anyone mint a session with a forged token. Docs: https://mojoauth.com/integrations/wordpress/oauth-2-sso/
Verified resolution: implement login in two halves. Frontend: collect the MojoAuth token from the widget and POST it to your own backend endpoint. Backend: forward it to the MojoAuth users verify endpoint with your API key in the header, read isValid from the response, and only then create your app session from the returned user data. Keep the API key server-side, never in frontend code or env vars that ship to the browser. If isValid is false or the call errors, reject the login outright, dont fall back to a weaker check.
Source URL: https://mojoauth.com/integrations/wordpress/oauth-2-sso/
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_vqZkPjJVTVHnThJ8psP_kA" 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: always verify the login token on your server, never in the browser <span>— Vectle</span></a>