No create app session if already exists

This commit is contained in:
localhost_frssoft 2022-04-12 01:27:27 +03:00
parent fd21b04bc1
commit eab20a07c6

View file

@ -28,6 +28,7 @@ fi
auth_api_create_client()
{
if [ ! -e ".app_sessions/$instance" ]; then
curl -s --compressed --url $instance_point/apps \
--data-urlencode 'client_name=pleroma-cli' \
--data-urlencode 'redirect_uris=urn:ietf:wg:oauth:2.0:oob' \
@ -35,6 +36,7 @@ auth_api_create_client()
--data-urlencode 'website=https://gitea.phreedom.club/localhost_frssoft/pleroma-cli' \
--output .app_sessions/$instance
chmod 600 .app_sessions/$instance
fi
}
auth_api_get_code()