Skip to content

Instantly share code, notes, and snippets.

@sean9999
Created November 18, 2017 03:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sean9999/4e2e5bc25a229c6f732e7aa72af84644 to your computer and use it in GitHub Desktop.
Save sean9999/4e2e5bc25a229c6f732e7aa72af84644 to your computer and use it in GitHub Desktop.
blockstack handler
#!/bin/sh
PORTAL_URL="http://localhost:8888"
# expect blockstack:AUTHENTICATION_TOKEN
if [ -z "$1" ]; then
exit 1
fi
AUTH_TOKEN="$(echo "$1" | sed -r 's/blockstack://g' | cut -c 4-)"
echo "request: $@" >> ~/blockstack/log.txt
notify-send $AUTH_TOKEN
exec sensible-browser "$PORTAL_URL/auth?authRequest=$AUTH_TOKEN"
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment