Skip to content

Instantly share code, notes, and snippets.

@sean9999
Created Nov 18, 2017
Embed
What would you like to do?
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