Skip to content

Commit d490fdd

Browse files
committed
Update webext docs
1 parent bc11100 commit d490fdd

2 files changed

Lines changed: 46 additions & 7 deletions

File tree

creds-ui/data/meson.build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,4 +81,4 @@ if get_option('profile') == 'development'
8181
build_by_default: true,
8282
build_always_stale: true,
8383
)
84-
endif
84+
endif

webext/README.md

Lines changed: 45 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,49 @@ Currently, this is written only for Firefox; there will be some slight API tweak
55

66
This requires some setup to make it work:
77

8-
1. Copy `app/credential_manager_shim.json` to `~/.mozilla/native-messaging-hosts/credential_manager_shim.json`.
9-
2. In the copied file, replace the `path` key with the absolute path to `app/credential_manager_shim.py`
8+
# Prerequisites
9+
10+
Currently, this web extension relies on the `dbus-next` to interact with D-Bus
11+
services. If you have that package installed in your system Python, this
12+
should work. You can test using the following:
13+
14+
```shell
15+
python3 -c 'import dbus_next; print("dbus-next is installed")'
16+
```
17+
18+
If that completes without error, then you're good to go. Otherwise, you have a
19+
couple of options:
20+
21+
- Install the system package for your operating system, for example:
22+
```shell
23+
# Fedora
24+
dnf install python3-dbus-next
25+
# Debian/Ubuntu
26+
apt install python3-dbus-next
27+
# Arch
28+
pacman -S python-dbus-next
29+
```
30+
- Modify the shebang to point to a Python instance that does have the package installed.
31+
```shell
32+
cd webext/
33+
python3 -m venv env
34+
source ./env/bin/activate
35+
pip3 install dbus-next
36+
echo "Change the first line in webext/app/credential_manager_shim.py to:"
37+
echo "#!$(readlink -f ./env/bin/python3)"
38+
# Update the shebang to point to the absolute path to webext/env/bin/python3
39+
```
40+
41+
# Setup Instructions
42+
43+
(Note: Paths are relative to root of this repository)
44+
45+
1. Copy `webext/app/credential_manager_shim.json` to `~/.mozilla/native-messaging-hosts/credential_manager_shim.json`.
46+
2. In the copied file, replace the `path` key with the absolute path to `webext/app/credential_manager_shim.py`
1047
3. Open Firefox and go to `about:debugging`
11-
4. Click "This Firefox" > Load Temporary Extension. Select `add-on/manifest.json`
12-
6. Build and run the `xyz-iinuwa-credential-manager-portal-gtk` binary to start the D-Bus service.
13-
5. Navigate to [https://webauthn.io]().
14-
6. Run through the registration and creation process.
48+
4. Click "This Firefox" > Load Temporary Extension. Select `webext/add-on/manifest.json`
49+
5. Build with `ninja -C ./build` and run the following binaries binary to start the D-Bus services.
50+
- `GSCHEMA_SCHEMA_DIR=build/creds-ui/data ./build/creds-ui/target/debug/creds-ui`
51+
- `./build/credsd/target/debug/credsd`
52+
6. Navigate to [https://webauthn.io]().
53+
7. Run through the registration and creation process.

0 commit comments

Comments
 (0)