mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2026-05-22 16:14:20 -05:00
[PR #3592] [MERGED] Implement "login with device" #6949
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/dani-garcia/vaultwarden/pull/3592
Author: @quexten
Created: 6/17/2023
Status: ✅ Merged
Merged: 8/13/2023
Merged by: @BlackDex
Base:
main← Head:feature/login-with-device📝 Commits (1)
8d7b3dbImplement login-with-device📊 Changes
20 files changed (+842 additions, -8 deletions)
View changed files
➕
migrations/mysql/2023-06-17-200424_create_auth_requests_table/down.sql(+0 -0)➕
migrations/mysql/2023-06-17-200424_create_auth_requests_table/up.sql(+19 -0)➕
migrations/postgresql/2023-06-17-200424_create_auth_requests_table/down.sql(+0 -0)➕
migrations/postgresql/2023-06-17-200424_create_auth_requests_table/up.sql(+19 -0)➕
migrations/sqlite/2023-06-17-200424_create_auth_requests_table/down.sql(+0 -0)➕
migrations/sqlite/2023-06-17-200424_create_auth_requests_table/up.sql(+19 -0)📝
src/api/core/accounts.rs(+217 -3)📝
src/api/core/mod.rs(+1 -0)📝
src/api/identity.rs(+23 -1)📝
src/api/mod.rs(+2 -1)📝
src/api/notifications.rs(+182 -2)📝
src/api/push.rs(+37 -0)📝
src/config.rs(+8 -0)➕
src/db/models/auth_request.rs(+148 -0)📝
src/db/models/device.rs(+88 -0)📝
src/db/models/mod.rs(+3 -1)📝
src/db/schemas/mysql/schema.rs(+22 -0)📝
src/db/schemas/postgresql/schema.rs(+22 -0)📝
src/db/schemas/sqlite/schema.rs(+22 -0)📝
src/main.rs(+10 -0)📄 Description
This is a very WIP pull-request for login-with-device. To run this, you need a new client version, for the web client this is 2023.06 (or latest master as of today) since login-with-device was disabled for self-hosted installations previously.
Basic login-with-device on WebSocket clients (desktop/web/webextension) works, but there is still quite some work to be done.
Screencast from 2023-06-17 23-53-39.webm
This PR implements a few components to make the login-with-device work, each still partially incomplete.
Aside from the points missing mentioned above, mobile push is not implemented yet, and a lot of code clean-up needs to be done.
Feel free to comment general comments, keep in mind the PR is very WIP so a lot of parts are missing and there is a lot of clean-up to be done.
I will squash the PR when it is done.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.