diff options
| author | Paul Buetow <paul@buetow.org> | 2024-10-04 23:17:10 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2024-10-04 23:17:10 +0300 |
| commit | cb38f62ea7fe65732180805a1555bf969e9394ee (patch) | |
| tree | 0c818ea93606ec1f5bbedc7ed55325c71ea63268 /internal/platforms | |
| parent | dd959fcfb3a3aa5a01d3d3912b1c976e653b71d8 (diff) | |
add more todos
Diffstat (limited to 'internal/platforms')
| -rw-r--r-- | internal/platforms/linkedin/oauth2.go | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/internal/platforms/linkedin/oauth2.go b/internal/platforms/linkedin/oauth2.go index abd6164..0492059 100644 --- a/internal/platforms/linkedin/oauth2.go +++ b/internal/platforms/linkedin/oauth2.go @@ -124,13 +124,16 @@ func oauthCallbackHandler(w http.ResponseWriter, r *http.Request) { _, _ = w.Write([]byte("Successfully posted a message to LinkedIn!\n")) } +// TODO: Check for how logn the access token is valid for +// TODO: Fetch the access token and user ID and store it i na file in .config/gos/... +// TODO: Refresh access token when it is about to expire or expired +// TODO: Separate posting of the message and fetching of the userID and access token func oauth(args config.Args) error { - // Configure the OAuth2 client oauthConfig = &oauth2.Config{ ClientID: args.Secrets.LinkedInClientID, ClientSecret: args.Secrets.LinkedInSecret, RedirectURL: args.Secrets.LinkedInRedirectURL, - Scopes: []string{"profile", "openid", "w_member_social"}, + Scopes: []string{"openid", "profile", "w_member_social"}, Endpoint: linkedin.Endpoint, } |
