scout_login
Open a visible browser window for the user to sign in as a role and save that session for later attach calls. Use when attach is refused because no valid sign-in is saved.
Instructions
Open a visible browser window for the USER to sign in to the app as a role, and save that sign-in for scout_attach { role }. Use it when an attach is refused because no sign-in is saved for the role, or the saved one has expired. Tell the user first, in plain words: "A browser window is opening. Sign in there as you normally would; it closes by itself once you are in." The window saves once the user is back on the app with a new session (a round trip through a single sign-on provider is followed, not taken for the end) and closes. Never type credentials into it yourself. Returns once signed in and saved, or after waitSeconds with the window still open: then call scout_login again with the same role to keep waiting. Closing the window saves nothing. Needs a desktop: on a machine with no display, ask the user to run scenescout login <url> --role <name> where they can see the window.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | Where to sign in: the app's address or its sign-in page, e.g. http://localhost:3000/login | |
| role | Yes | The name to save the sign-in under, e.g. admin; scout_attach { role } signs in with it | |
| browser | No | Browser to open. Default: the SCENESCOUT_BROWSER environment variable, else chromium | |
| successUrl | No | Only when the user says how to tell: signed in once the URL's path contains this, or the URL starts with it (an absolute URL), instead of when a new session appears | |
| projectPath | No | Absolute path to the project (the sign-in is saved in .scenescout/auth/ here), as for scout_attach. Omitted: the same folder an attach with no projectPath uses for this site, which the result names. | |
| waitSeconds | No | How long this call waits for the user before returning with the window still open (default 120) |