From 728830ebd316a2bb3508d9f1ec46a8b1ee70968a Mon Sep 17 00:00:00 2001 From: syui Date: Tue, 22 Oct 2024 01:40:35 +0900 Subject: [PATCH] fix --- README.md | 20 ++++++++++++++++++++ build.sh | 1 + 2 files changed, 21 insertions(+) diff --git a/README.md b/README.md index 1385a19..6c947cf 100644 --- a/README.md +++ b/README.md @@ -86,3 +86,23 @@ json="{\"useCount\":1}" curl -X POST -u admin:${admin_password} -H "Content-Type: application/json" -d "$json" -sL $url ``` +## oauth + +```sh +# https://github.com/bluesky-social/cookbook/tree/main/python-oauth-web-app +$ cd ./repos/cookbook/python-oauth-web-app +$ rye sync +$ rye run python3 -c 'import secrets; print(secrets.token_hex())'|xargs echo FLASK_SECRET_KEY|tr -d ' ' >> .env +$ rye run python3 generate_jwk.py |xargs echo FLASK_CLIENT_SECRET_JWK|tr -d ' ' >> .env +$ cat .env +$ rye run flask run +``` + +please access `127.0.0.1:5000`. it may not work if you use localhost. + +also, oauth doesn't work on localhost. use [ngrok](https://ngrok.com/), [tailscale](https://tailscale.com/). + +```sh +$ ngrok http http://localhost:5000 +``` + diff --git a/build.sh b/build.sh index b62bd37..c50506f 100755 --- a/build.sh +++ b/build.sh @@ -6,4 +6,5 @@ git clone https://github.com/bluesky-social/atproto git clone https://github.com/did-method-plc/did-method-plc git clone https://github.com/bluesky-social/feed-generator git clone https://github.com/bluesky-social/social-app +git clone https://github.com/bluesky-social/cookbook git clone https://github.com/itaru2622/bluesky-selfhost-env