Skip to main content
Back to all modules

Cloud Auth / Identity

Add cloud accounts, sessions, and access control

Connect your project to cloud-managed accounts: users register, log in, and sessions stay secure in the cloud. No backend to build — IFQ Cloud handles account storage, verification, and access protection.

What this cloud module can do

Email / SMS code loginThird-party login (WeChat, GitHub, …)Cloud sessions & login statePassword hashing & account security
Scenario prompts

Cloud Auth / Identity

Pick the scenario closest to your need and copy the prompt in one click.

Email / SMS code login

Let users log in with a cloud-sent email or phone code — no passwords to remember.

The problem today

Your project has no cloud account system; anyone can open it and data is not per-user.

What you get

  • Full sign-up / login / logout flow
  • Code sending & verification
  • Users only see their own data after login
ForBusiness tools that need per-user data and protection

Copy the whole block below and paste it into Codex. Replace placeholders like API keys with real values from the IFQ Cloud console.

You are a senior full-stack engineer. In my currently open local project, add "email or SMS verification-code login" with cloud-sent and cloud-verified codes so users must log in before using core features.

[Features to build]
- Provide sign-up, login, and logout entries; UI in the app language and consistent with the existing style.
- Login flow: user enters email or phone, cloud sends a code, correct code logs them in.
- Persist login state after success; stays logged in across refresh/restart until logout.
- Protect core pages: redirect to login when not authenticated.

[Connect to IFQ Cloud]
- API base https://api.cloud.ifq.ai, official SDK `jieshi-cloud` (if unavailable, use plain HTTPS equivalently and note the endpoint in a comment).
- Secrets via environment variables, never hard-coded: JIESHI_CLOUD_API_KEY, JIESHI_CLOUD_PROJECT_ID; generate `.env.example` with both, noting "get real values from the IFQ Cloud console and replace".
- All placeholders; without real values, run on placeholders and print a hint on where to replace them.

[Engineering requirements]
- Read the existing structure and stack first; follow current conventions, add only necessary files, leave unrelated code untouched.
- Network calls: timeout + graceful fallback; friendly errors, never crash.
- Demo / mock mode: the main flow runs on sample data without keys.
- Include a minimal runnable self-test with run instructions.
- On completion list: files changed / how to start / how to roll back.

Ask before any decision point.

*— [ifq.ai](https://work.ifq.ai/) · AI-augmented. Full-stack crafted*

One-tap third-party login (WeChat / GitHub)

Let users sign in with existing WeChat, GitHub, etc. — no registration.

The problem today

Forcing a brand-new account is high friction; many users just leave.

What you get

  • One-tap authorized login, no forms
  • Auto-fetch avatar, nickname, basics
  • Bind multiple login methods to one user
ForConsumer-facing products that want low signup friction

Copy the whole block below and paste it into Codex. Replace placeholders like API keys with real values from the IFQ Cloud console.

You are a senior full-stack engineer. In my currently open local project, add "one-tap third-party login" (e.g. WeChat, GitHub) so users sign in with existing accounts.

[Features to build]
- Add third-party login buttons on the login page; clicking runs the authorization flow and completes login on callback.
- On first login, auto-create the account and store nickname, avatar, and basics.
- Treat different login methods sharing an email as the same user; allow binding.
- Keep code-login as a fallback; both methods feed the same account system.

[Connect to IFQ Cloud]
- API base https://api.cloud.ifq.ai, official SDK `jieshi-cloud` (if unavailable, use plain HTTPS equivalently and note the endpoint in a comment).
- Secrets via environment variables, never hard-coded: JIESHI_CLOUD_API_KEY, JIESHI_CLOUD_PROJECT_ID; generate `.env.example` with both, noting "get real values from the IFQ Cloud console and replace".
- All placeholders; without real values, run on placeholders and print a hint on where to replace them.

[Engineering requirements]
- Read the existing structure and stack first; follow current conventions, add only necessary files, leave unrelated code untouched.
- Network calls: timeout + graceful fallback; friendly errors, never crash.
- Demo / mock mode: the main flow runs on sample data without keys.
- Include a minimal runnable self-test with run instructions.
- On completion list: files changed / how to start / how to roll back.

Ask before any decision point.

*— [ifq.ai](https://work.ifq.ai/) · AI-augmented. Full-stack crafted*

Cloud sessions & role-based protection

Manage session lifetime, auto-renew, and role-based access in the cloud.

The problem today

After login there is no session lifetime, and no way to separate admin from regular users.

What you get

  • Login lifetime & auto-renew
  • Secure logout clearing the cloud session
  • Role-based access (admin / regular)
ForInternal systems with multiple roles and access control

Copy the whole block below and paste it into Codex. Replace placeholders like API keys with real values from the IFQ Cloud console.

You are a senior full-stack engineer. In my currently open local project, improve "cloud sessions and role-based protection", managing session lifetime and role-based access.

[Features to build]
- Give sessions a sensible lifetime, auto-renew near expiry, and guide re-login after expiry.
- Provide secure logout that clears both local and cloud sessions.
- Support roles (e.g. admin, regular); different roles see different features and data.
- Verify permissions in the cloud: hide entries on the frontend AND reject unauthorized requests on the backend.

[Connect to IFQ Cloud]
- API base https://api.cloud.ifq.ai, official SDK `jieshi-cloud` (if unavailable, use plain HTTPS equivalently and note the endpoint in a comment).
- Secrets via environment variables, never hard-coded: JIESHI_CLOUD_API_KEY, JIESHI_CLOUD_PROJECT_ID; generate `.env.example` with both, noting "get real values from the IFQ Cloud console and replace".
- All placeholders; without real values, run on placeholders and print a hint on where to replace them.

[Engineering requirements]
- Read the existing structure and stack first; follow current conventions, add only necessary files, leave unrelated code untouched.
- Network calls: timeout + graceful fallback; friendly errors, never crash.
- Demo / mock mode: the main flow runs on sample data without keys.
- Include a minimal runnable self-test with run instructions.
- On completion list: files changed / how to start / how to roll back.

Ask before any decision point.

*— [ifq.ai](https://work.ifq.ai/) · AI-augmented. Full-stack crafted*