You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(authentication): temporary access link with bearer token (#1742)
## Done
Suggested flow:
1. User runs lxd init | CLI outputs https://<ip>:8443/?token=xyz...
2. User opens link | UI detects token in URL, saves to Auth state,
redirects to Dashboard.
3. The Warning | Status bar appears: ⚠️ Temporary session. Expires in 23
hours 59 minutes 10 seconds.
4. User clicks "Setup permanent access" | UI navigates to Authentication
setup page.
5. Selection | User chooses OIDC or TLS to "lock in" access.
6. Clean up | On successful login with TLS, UI calls logout endpoint to
remove now unnecessary bearer token.
## QA
1. Run the LXD-UI:
- On the demo server via the link posted by @webteam-app below. This is
only available for PRs created by collaborators of the repo. Ask @Kxiru
or @edlerd for access.
- With a local copy of this branch, [build and run as described in the
docs](https://github.com/canonical/lxd-ui/blob/main/CONTRIBUTING.md#setting-up-for-development).
2. Perform the following QA steps:
- Backend should be latest edge. Run `lxd init
--ui-temporary-access-link`
- Click on the link generated by backend. It should take you to LXD UI.
Ensure you have access to everything.
- Note the beautiful warning at the bottom of the page with a count
down.
- Manually logout. Ensure you can log back in with same link.
- Ensure you can not log in with an expired or invalid token, you should
see an error notification with action: logout. Click on logout and make
sure the bearer token cookie is removed from your browser.
- Log back in with the bearer token. Click on `Setup permanent access` >
`Setup TLS login`. If not already done, import certificate in your
browser, otherwise go to step 2. Make sure the name is pre-filled and
`admins` group is pre-checked. Click on `Create identity`, you should be
automatically logged in with TLS (you can check Permissions >
Identities). Ensure the bearer token was automatically removed.
## Screenshots
Warning in status bar at the bottom of the screen with countdown every
second
<img width="1847" height="1065" alt="image"
src="https://github.com/user-attachments/assets/35004d61-6ddf-4645-93c7-93ad47b266cd"
/>
Authentication setup screen (after clicking on `Setup permanent access`)
<img width="1851" height="1053" alt="image"
src="https://github.com/user-attachments/assets/20731aad-8176-4951-8dd0-19aa874e8ee3"
/>
Updated Login page to match Authentication setup page
<img width="1851" height="1053" alt="Screenshot from 2026-02-20
10-11-36"
src="https://github.com/user-attachments/assets/8c0ae261-a470-45c7-b2e0-11077dbaaf90"
/>
CertificateGenerate with bearer token
<img width="1851" height="1053" alt="image"
src="https://github.com/user-attachments/assets/676d3665-15dd-49aa-a9ae-3f6ed3005596"
/>
Create TLS identity screen with bearer token
<img width="1851" height="1053" alt="image"
src="https://github.com/user-attachments/assets/918e20ce-182e-47ca-ab5a-4b023528e731"
/>
0 commit comments