mirror of
http://gitea.phreedom.club/localhost_frssoft/pleroma-cli
synced 2024-11-22 05:11:26 +00:00
easy changeable browser for auth
This commit is contained in:
parent
60daf22e59
commit
1770ab93de
|
@ -11,6 +11,6 @@ Depends:
|
||||||
* [jj](http://gitea.phreedom.club/localhost_frssoft/jj)
|
* [jj](http://gitea.phreedom.club/localhost_frssoft/jj)
|
||||||
* [curl](https://curl.se/)
|
* [curl](https://curl.se/)
|
||||||
* [fzy](https://github.com/jhawthorn/fzy)
|
* [fzy](https://github.com/jhawthorn/fzy)
|
||||||
* links - for authorization on instances
|
* Any browser (links set by default) - for authorization on instances
|
||||||
|
|
||||||
Also, thk Tolstoevsky for Pleroma instance (set by default instance)
|
Also, thk Tolstoevsky for Pleroma instance (set by default instance)
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
instance=$(jj -i config.json instance)
|
instance=$(jj -i config.json instance)
|
||||||
|
alias default_auth_browser=links
|
||||||
instance_point="https://$instance/api/v1"
|
instance_point="https://$instance/api/v1"
|
||||||
instance_point_pleroma="https://$instance/api/pleroma"
|
instance_point_pleroma="https://$instance/api/pleroma"
|
||||||
instance_hist='instance.hist'
|
instance_hist='instance.hist'
|
||||||
|
@ -48,7 +49,7 @@ auth_api_get_code()
|
||||||
{
|
{
|
||||||
auth_api_create_client
|
auth_api_create_client
|
||||||
client_id=$(jj -i .app_sessions/$instance client_id)
|
client_id=$(jj -i .app_sessions/$instance client_id)
|
||||||
links "https://$instance/oauth/authorize?client_id=$client_id&response_type=code&redirect_uri=urn:ietf:wg:oauth:2.0:oob&scope=read+write+follow"
|
default_auth_browser "https://$instance/oauth/authorize?client_id=$client_id&response_type=code&redirect_uri=urn:ietf:wg:oauth:2.0:oob&scope=read+write+follow"
|
||||||
echo 'Input token-code:'
|
echo 'Input token-code:'
|
||||||
read pass
|
read pass
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue