Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
GCP Authenticator Script
echo -n "Client ID: "
read client_id
echo -n "Client secret: "
read client_secret
echo -n "Redirect URI: "
read redirect_uri
open "$client_id&redirect_uri=$redirect_uri&access_type=offline&scope="
echo -n "Authorization code (from browser): "
read authorization_code
curl -d "code=$authorization_code&client_id=$client_id&client_secret=$client_secret&redirect_uri=$redirect_uri&grant_type=authorization_code"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment