-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Automatic renew facebook token #36
Conversation
6b5aa96
to
ddff601
Compare
I'm stuck and post a question here: https://stackoverflow.com/questions/72424607/update-a-github-repository-secret-from-a-github-action @alex-rowbottom Do you have knowledge in facebook auth or github actions that could help ? |
This could help: hmanzur/actions-set-secret#15 |
Here is the API call to get a token with a 45 days duration:
The idea would be:
|
Here is some help to update a repository secret: https://docs.github.com/en/rest/actions/secrets#create-or-update-a-repository-secret |
@alex-rowbottom would you help me with that ? |
I finally sorted this out because I struggled to renew the token every month. I first used my personal github token which was not very so I replaced it by a fine grained access token that can only read and write secret. I'm still wondering if this is very safe because an external pull request could leak the secrets so I'd like some feedback. |
The facebook token expires after two months. Since it is possible to get a new token with the facebook API and update it in the github action secret, this would be nice to update it automatically (every two months) to reduce manual maintenance on the website.
If we forget to update the token, the event page will display en empty list: https://www.atelier-medias.org/les-evenements