Currently when running the start host binary, the user needs to go to the authorization URL, finish the flow, then select the auth code from the redirect URL and copy it back to the terminal. Selecting just the code from the URL is quite painful, especially when the user needs to the touchpad to select it.
We can probably just allow the user to paste the whole redirect URL then we just find out the code using /code=([^&]+)(&|$)/. We can fallback to using the whole string as code if the regex doesn't match.
Currently when running the start host binary, the user needs to go to the authorization URL, finish the flow, then select the auth code from the redirect URL and copy it back to the terminal. Selecting just the code from the URL is quite painful, especially when the user needs to use the touchpad to select it.
We can probably just allow the user to paste the whole redirect URL then we just find out the code using /code=([^&]+)(&|$)/. We can fallback to using the whole string as code if the regex doesn't match.
Comment 1 by yuweih@google.com
, Dec 7