21 lines
426 B
Bash
Executable File
21 lines
426 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -o errexit
|
|
|
|
main() {
|
|
[[ "${OOM_CLIENT_ID}" ]] || {
|
|
echo "Missing \$OOM_CLIENT_ID"
|
|
exit 1
|
|
}
|
|
|
|
local url='https://accounts.google.com/o/oauth2/auth'
|
|
|
|
url="${url}?client_id=${OOM_CLIENT_ID}"
|
|
url="${url}&redirect_uri=urn:ietf:wg:oauth:2.0:oob"
|
|
url="${url}&scope=https://www.googleapis.com/auth/youtube"
|
|
url="${url}&response_type=code&access_type=offline"
|
|
|
|
echo "${url}"
|
|
}
|
|
|
|
main "$@"
|