We generate the onboarding token to allow onboarding requests, but after onboarding has been completed, we probably want to delete the token because it will no longer be necessary.
We could do that immediately (currently supported in the Jetpack settings endpoint by providing the end parameter to the onboarding setting).
Another possible way is to clean the onboarding tokens automatically using a cron job (wp_schedule_event()).
Probably the best way to do it is upon successful Jetpack connection.
We generate the onboarding token to allow onboarding requests, but after onboarding has been completed, we probably want to delete the token because it will no longer be necessary.
We could do that immediately (currently supported in the Jetpack settings endpoint by providing the
endparameter to theonboardingsetting).Another possible way is to clean the onboarding tokens automatically using a cron job (
wp_schedule_event()).Probably the best way to do it is upon successful Jetpack connection.