원클릭으로
revyl-cli-auth-bypass-react-native
React Native bare leaf recipe for test-only auth bypass deep links using Revyl launch variables.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
React Native bare leaf recipe for test-only auth bypass deep links using Revyl launch variables.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Keep a repo's Revyl remote build mirrored with its CI pipeline - update both in the same PR and debug drift between them.
Revyl conventions for Cursor Cloud/background agents - headless VM rules, remote builds, artifact evidence, session cleanup, and PR flow.
MCP dev-first mobile loop for reliable screenshot-observe-action execution and grounded interactions.
Set up test-only auth bypass for Revyl runs across Expo, React Native, native iOS, native Android, and Flutter apps.
Generic CLI-first Revyl dev loop for hot reload, rebuild-loop, and device exploration.
Create robust Revyl E2E tests using CLI commands from app source analysis or exploratory sessions.
| name | revyl-cli-auth-bypass-react-native |
| description | React Native bare leaf recipe for test-only auth bypass deep links using Revyl launch variables. |
Use this leaf skill when revyl-cli-auth-bypass has selected a bare React Native app. This is app code guidance, not a Revyl authentication shortcut.
For the first-pass setup, start from revyl-cli-auth-bypass; it detects the stack, applies the shared safety contract, and delegates here for React Native implementation details.
revyl dev list, screenshots, or reports can answer the question..claude/skills slash-command discovery plus WebFetch/WebSearch or configured MCP/browser tools; Cursor .cursor/skills plus .cursor/rules/revyl-skills.mdc and available MCP/browser tools.revyl device screenshot or revyl device report instead of claiming browser access.Use one app-specific deep link shape:
myapp://revyl-auth?token=<token>&role=<role>&redirect=<allowlisted-route>
Gate the handler with Revyl launch variables:
revyl global launch-var create REVYL_AUTH_BYPASS_ENABLED=true
revyl global launch-var create REVYL_AUTH_BYPASS_TOKEN=<test-only-token>
Linking listener for initial and runtime URLs.REVYL_AUTH_BYPASS_* from ProcessInfo.processInfo.arguments.REVYL_AUTH_BYPASS_* from the launch Intent extras.Keep the JS hook close to the root navigator so it can route after auth succeeds:
import { useEffect } from "react";
import { Linking, NativeModules } from "react-native";
const allowedRedirects = new Map([
["/account", "Account"],
["/checkout", "Checkout"],
["/cart", "Cart"],
]);
const allowedRoles = new Set(["buyer", "support"]);
async function getLaunchConfig() {
return NativeModules.RevylLaunchConfig.getRevylAuthBypassConfig();
}
export async function handleRevylAuthBypass(rawURL: string) {
const url = new URL(rawURL);
if (url.protocol !== "myapp:" || url.hostname !== "revyl-auth") return false;
const config = await getLaunchConfig();
const token = url.searchParams.get("token");
const role = url.searchParams.get("role") || "buyer";
const redirect = url.searchParams.get("redirect") || "/account";
const route = allowedRedirects.get(redirect);
if (!config.enabled) throw new Error("Revyl auth bypass is disabled");
if (!config.token || token !== config.token) throw new Error("Bad Revyl auth bypass token");
if (!allowedRoles.has(role)) throw new Error("Role is not allowlisted");
if (!route) throw new Error("Redirect is not allowlisted");
await createTestSession({ role });
navigationRef.navigate(route);
return true;
}
export function useRevylAuthBypass() {
useEffect(() => {
Linking.getInitialURL().then(url => {
if (url) void handleRevylAuthBypass(url);
});
const subscription = Linking.addEventListener("url", event => {
void handleRevylAuthBypass(event.url);
});
return () => subscription.remove();
}, []);
}
Replace createTestSession, navigationRef, and route names with the app's real auth and navigation primitives.
Expose only the two Revyl launch variables to JS. On iOS, read simulator launch arguments. On Android, read launch intent extras. If the app already has a native config bridge, extend that instead of adding a new module.
func launchValue(_ key: String) -> String? {
let args = ProcessInfo.processInfo.arguments
guard let index = args.firstIndex(of: "-\(key)") else { return nil }
let valueIndex = args.index(after: index)
return args.indices.contains(valueIndex) ? args[valueIndex] : nil
}
fun launchValue(intent: Intent?, key: String): String? {
return intent?.getStringExtra(key)
}
Register the app's URL scheme in both native projects:
myapp to CFBundleURLTypes in Info.plist.android:scheme="myapp" and android:host="revyl-auth" on the main activity.Start a fresh Revyl session with launch vars attached:
export REVYL_AUTH_BYPASS_TOKEN="<test-only-token>"
revyl global launch-var update REVYL_AUTH_BYPASS_TOKEN --value "$REVYL_AUTH_BYPASS_TOKEN"
revyl dev --no-build \
--launch-var REVYL_AUTH_BYPASS_ENABLED \
--launch-var REVYL_AUTH_BYPASS_TOKEN
Then verify valid and rejected links:
revyl device navigate --url "myapp://revyl-auth?token=$REVYL_AUTH_BYPASS_TOKEN&role=buyer&redirect=%2Fcheckout"
revyl device screenshot --out /tmp/revyl-auth-bypass-rn-valid.png
revyl device navigate --url "myapp://revyl-auth?token=wrong-token&role=buyer&redirect=%2Fcheckout"
revyl device navigate --url "myapp://revyl-auth?token=$REVYL_AUTH_BYPASS_TOKEN&role=admin&redirect=%2Fcheckout"
revyl device navigate --url "myapp://revyl-auth?token=$REVYL_AUTH_BYPASS_TOKEN&role=buyer&redirect=%2Fadmin"
revyl device screenshot --out /tmp/revyl-auth-bypass-rn-rejected.png
REVYL_AUTH_BYPASS_ENABLED=true.