ai/at
1
0
This commit is contained in:
2024-10-22 01:40:35 +09:00
parent cdf0fb2556
commit 728830ebd3
2 changed files with 21 additions and 0 deletions

View File

@ -86,3 +86,23 @@ json="{\"useCount\":1}"
curl -X POST -u admin:${admin_password} -H "Content-Type: application/json" -d "$json" -sL $url 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
```

View File

@ -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/did-method-plc/did-method-plc
git clone https://github.com/bluesky-social/feed-generator 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/social-app
git clone https://github.com/bluesky-social/cookbook
git clone https://github.com/itaru2622/bluesky-selfhost-env git clone https://github.com/itaru2622/bluesky-selfhost-env