Skip to content

Commit cb59b62

Browse files
committed
feat(auth): support bootstrap signup fallback onboarding
1 parent 5e3ac24 commit cb59b62

5 files changed

Lines changed: 21 additions & 16 deletions

File tree

README.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -155,8 +155,8 @@ occ start
155155
```
156156

157157
If this is the first startup with no configured managed users, the container logs will print an **Initial One-Time Password (IOTP)**.
158-
Open the login page, use the first-time setup panel, and enroll a passkey for the default `opencoder` account.
159-
The IOTP is invalidated after successful passkey enrollment.
158+
Open the login page, use the first-time setup panel, then continue to passkey setup where you can either enroll a passkey or choose username/password registration.
159+
The IOTP is invalidated after successful passkey enrollment or successful username/password bootstrap signup.
160160
Built-in image users (for example `ubuntu`/`opencoder`) do not count as configured users for IOTP bootstrap.
161161

162162
Quick IOTP extraction from logs:
@@ -171,7 +171,7 @@ You can also run the setup wizard:
171171
occ setup
172172
```
173173

174-
The wizard now configures runtime settings (image source, bind/port, mounts), keeps authentication on IOTP + passkey onboarding, and attempts to auto-detect the IOTP from logs after start.
174+
The wizard now configures runtime settings (image source, bind/port, mounts), keeps authentication on IOTP-first onboarding, and attempts to auto-detect the IOTP from logs after start.
175175

176176
### From source (install locally)
177177

@@ -370,8 +370,10 @@ First boot path:
370370
- Extract only the IOTP quickly: `occ logs | grep -F "INITIAL ONE-TIME PASSWORD (IOTP): " | tail -n1 | sed 's/.*INITIAL ONE-TIME PASSWORD (IOTP): //'`
371371
- `occ setup` attempts to auto-detect and print the IOTP after starting/restarting the service.
372372
- Enter that IOTP in the web login page first-time setup panel.
373-
- Enroll a passkey for the default `opencoder` account.
374-
- The IOTP is deleted after successful passkey enrollment.
373+
- Continue to passkey setup, then choose one of:
374+
- Enroll a passkey for the default `opencoder` account, or
375+
- Use the username/password fallback to create your first managed user.
376+
- The IOTP is deleted after successful passkey enrollment or successful username/password bootstrap signup.
375377
- To restart first-time onboarding after completion, run `occ reset iotp`.
376378
- Built-in image users (for example `ubuntu`/`opencoder`) do not disable IOTP bootstrap.
377379

docs/deploy/digitalocean-droplet.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,11 @@ If you used `occ setup`, it will also try to auto-detect and print the IOTP afte
8989
Open the web login page through your SSH tunnel and use the first-time setup panel:
9090
- Enter the IOTP from logs
9191
- Continue to passkey setup
92-
- Enroll a passkey for the default `opencoder` account
92+
- Then either:
93+
- Enroll a passkey for the default `opencoder` account, or
94+
- Use username/password fallback to create your first managed user
9395

94-
The IOTP is invalidated after successful passkey enrollment.
96+
The IOTP is invalidated after successful passkey enrollment or successful username/password bootstrap signup.
9597

9698
Admin fallback:
9799

@@ -285,7 +287,7 @@ Extract only the IOTP value:
285287
docker logs opencode-cloud-sandbox 2>&1 | grep -F "INITIAL ONE-TIME PASSWORD (IOTP): " | tail -n1 | sed 's/.*INITIAL ONE-TIME PASSWORD (IOTP): //'
286288
```
287289

288-
Use the login page first-time setup panel with that IOTP, then enroll a passkey for `opencoder`.
290+
Use the login page first-time setup panel with that IOTP, then continue to passkey setup where you can either enroll a passkey for `opencoder` or choose username/password registration to create your first managed user.
289291

290292
### 5) Expose publicly (optional)
291293

packages/cli-rust/src/commands/setup.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -277,8 +277,7 @@ async fn maybe_print_iotp_info(client: &DockerClient, host: Option<&str>, config
277277
style(iotp).green().bold()
278278
);
279279
println!(
280-
"Enter this in the web login first-time setup panel, then enroll a passkey for {}.",
281-
style("opencoder").cyan()
280+
"Enter this in the web login first-time setup panel, then choose passkey enrollment or username/password bootstrap signup.",
282281
);
283282
return;
284283
}

packages/core/README.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -155,8 +155,8 @@ occ start
155155
```
156156

157157
If this is the first startup with no configured managed users, the container logs will print an **Initial One-Time Password (IOTP)**.
158-
Open the login page, use the first-time setup panel, and enroll a passkey for the default `opencoder` account.
159-
The IOTP is invalidated after successful passkey enrollment.
158+
Open the login page, use the first-time setup panel, then continue to passkey setup where you can either enroll a passkey or choose username/password registration.
159+
The IOTP is invalidated after successful passkey enrollment or successful username/password bootstrap signup.
160160
Built-in image users (for example `ubuntu`/`opencoder`) do not count as configured users for IOTP bootstrap.
161161

162162
Quick IOTP extraction from logs:
@@ -171,7 +171,7 @@ You can also run the setup wizard:
171171
occ setup
172172
```
173173

174-
The wizard now configures runtime settings (image source, bind/port, mounts), keeps authentication on IOTP + passkey onboarding, and attempts to auto-detect the IOTP from logs after start.
174+
The wizard now configures runtime settings (image source, bind/port, mounts), keeps authentication on IOTP-first onboarding, and attempts to auto-detect the IOTP from logs after start.
175175

176176
### From source (install locally)
177177

@@ -370,8 +370,10 @@ First boot path:
370370
- Extract only the IOTP quickly: `occ logs | grep -F "INITIAL ONE-TIME PASSWORD (IOTP): " | tail -n1 | sed 's/.*INITIAL ONE-TIME PASSWORD (IOTP): //'`
371371
- `occ setup` attempts to auto-detect and print the IOTP after starting/restarting the service.
372372
- Enter that IOTP in the web login page first-time setup panel.
373-
- Enroll a passkey for the default `opencoder` account.
374-
- The IOTP is deleted after successful passkey enrollment.
373+
- Continue to passkey setup, then choose one of:
374+
- Enroll a passkey for the default `opencoder` account, or
375+
- Use the username/password fallback to create your first managed user.
376+
- The IOTP is deleted after successful passkey enrollment or successful username/password bootstrap signup.
375377
- To restart first-time onboarding after completion, run `occ reset iotp`.
376378
- Built-in image users (for example `ubuntu`/`opencoder`) do not disable IOTP bootstrap.
377379

0 commit comments

Comments
 (0)