mirror of
https://gitea.phreedom.club/localhost_frssoft/dybr2fedi.git
synced 2024-11-30 07:21:27 +00:00
Fix check auth
This commit is contained in:
parent
008c9d2230
commit
df930ba91d
|
@ -47,9 +47,9 @@ auth_api_get_token()
|
|||
--data-urlencode "redirect_uri=urn:ietf:wg:oauth:2.0:oob" \
|
||||
--data-urlencode 'scope=read write follow' \
|
||||
--data-urlencode "code=$pass" | jj access_token)
|
||||
echo > .auth
|
||||
chmod 600 .auth
|
||||
echo "$token" > .auth
|
||||
echo > "$basedir"/.auth
|
||||
chmod 600 "$basedir"/.auth
|
||||
echo "$token" > "$basedir"/.auth
|
||||
}
|
||||
|
||||
auth_api_get_token
|
||||
|
|
|
@ -14,9 +14,10 @@ touch $log_sended_articles
|
|||
|
||||
#[Fedi section]
|
||||
instance_point='https://expired.mentality.rip/api/v1'
|
||||
if [ ! -f .auth ]; then
|
||||
if [ ! -f "$basedir"/.auth ]; then
|
||||
export basedir
|
||||
"$basedir"/auth_helper.sh
|
||||
if [ ! -f .auth ]; then
|
||||
if [ ! -f "$basedir"/.auth ]; then
|
||||
echo 'Failed, access denied'
|
||||
else
|
||||
echo 'OK! Success'
|
||||
|
|
Loading…
Reference in a new issue