This is a Golang library to automatically get an authorization code for retrieving access token using OAuth2.
When it retrieves an access token and refresh token using OAuth2, the code for retrieving them has to be got by authorization on own browser. In order to retrieve the code, in generally, users have to click the authorization button and copy the code on the browser. This library can be automatically got the code by launching HTML server as a redirected server. At first, I have used this for retrieving the code from Google. But recently I noticed that this can be used for other sites. They are Google, GitHub, Slack and so on. This library can be used for creating such applications.
This method was used for gogauth. Next, it was used for ggsrun And, this was recreated as a library.
You can get this from https://github.com/tanaikech/getcode