Retirement notice: This procedure is historical. Do not apply its
shared-development callback, Vercel, or Fly commands; use the current OAuth
setup guide and shared-development retirement runbook.
Goal
Replace the currently shared provider OAuth credentials with separate credentials for:
local.
dev.
prod.
This runbook covers:
Google
OneDrive
Dropbox
Operating Mode
Use Git Bash on Windows 11. Do not use WSL.
Conventions
Projects and apps:
Vercel dev project: stratofusion-dev.
Vercel prod project: stratofusion-prod.
Fly dev app: stratofusion-rclone-dev.
Fly prod app: stratofusion-rclone-prod.
Environment URLs:
local: http://localhost:3000.
dev: https://dev.stratofusion.io.
prod: https://stratofusion.io.
Preparation
Before updating any provider, prepare the new values in Git Bash:
vercel link --scope rikster1s-projects --project stratofusion-dev --yes
printf'%s'"$GOOGLE_CLIENT_ID_DEV"| vercel envadd GOOGLE_CLIENT_ID production --force
printf'%s'"$GOOGLE_CLIENT_SECRET_DEV"| vercel envadd GOOGLE_CLIENT_SECRET production --force --sensitive
printf'%s'"$GOOGLE_REDIRECT_URI_DEV"| vercel envadd GOOGLE_REDIRECT_URI production --force
vercel deploy --prod --yes
Vercel Prod Update
vercel link --scope rikster1s-projects --project stratofusion-prod --yes
printf'%s'"$GOOGLE_CLIENT_ID_PROD"| vercel envadd GOOGLE_CLIENT_ID production --force
printf'%s'"$GOOGLE_CLIENT_SECRET_PROD"| vercel envadd GOOGLE_CLIENT_SECRET production --force --sensitive
printf'%s'"$GOOGLE_REDIRECT_URI_PROD"| vercel envadd GOOGLE_REDIRECT_URI production --force
vercel deploy --prod --yes
Fly Update
Current note:
The main app is the primary runtime source for provider credentials today.
Fly updates are still recommended so the env surface stays consistent across environments.
flyctl secrets set -a stratofusion-rclone-dev \GOOGLE_CLIENT_ID="$GOOGLE_CLIENT_ID_DEV"\GOOGLE_CLIENT_SECRET="$GOOGLE_CLIENT_SECRET_DEV"flyctl secrets set -a stratofusion-rclone-prod \GOOGLE_CLIENT_ID="$GOOGLE_CLIENT_ID_PROD"\GOOGLE_CLIENT_SECRET="$GOOGLE_CLIENT_SECRET_PROD"
Google Verification
local sign-in flow returns to http://localhost:3000/api/google.
dev sign-in flow returns to https://dev.stratofusion.io/api/google.
prod sign-in flow returns to https://stratofusion.io/api/google.
vercel link --scope rikster1s-projects --project stratofusion-dev --yes
printf'%s'"$ONEDRIVE_CLIENT_ID_DEV"| vercel envadd ONEDRIVE_CLIENT_ID production --force
printf'%s'"$ONEDRIVE_CLIENT_SECRET_DEV"| vercel envadd ONEDRIVE_CLIENT_SECRET production --force --sensitive
printf'%s'"$ONEDRIVE_REDIRECT_URI_DEV"| vercel envadd ONEDRIVE_REDIRECT_URI production --force
vercel deploy --prod --yes
Vercel Prod Update
vercel link --scope rikster1s-projects --project stratofusion-prod --yes
printf'%s'"$ONEDRIVE_CLIENT_ID_PROD"| vercel envadd ONEDRIVE_CLIENT_ID production --force
printf'%s'"$ONEDRIVE_CLIENT_SECRET_PROD"| vercel envadd ONEDRIVE_CLIENT_SECRET production --force --sensitive
printf'%s'"$ONEDRIVE_REDIRECT_URI_PROD"| vercel envadd ONEDRIVE_REDIRECT_URI production --force
vercel deploy --prod --yes
Fly Update
flyctl secrets set -a stratofusion-rclone-dev \ONEDRIVE_CLIENT_ID="$ONEDRIVE_CLIENT_ID_DEV"\ONEDRIVE_CLIENT_SECRET="$ONEDRIVE_CLIENT_SECRET_DEV"flyctl secrets set -a stratofusion-rclone-prod \ONEDRIVE_CLIENT_ID="$ONEDRIVE_CLIENT_ID_PROD"\ONEDRIVE_CLIENT_SECRET="$ONEDRIVE_CLIENT_SECRET_PROD"
OneDrive Verification
local sign-in flow returns to http://localhost:3000/api/onedrive.
dev sign-in flow returns to https://dev.stratofusion.io/api/onedrive.
prod sign-in flow returns to https://stratofusion.io/api/onedrive.
vercel link --scope rikster1s-projects --project stratofusion-dev --yes
printf'%s'"$DROPBOX_CLIENT_ID_DEV"| vercel envadd DROPBOX_CLIENT_ID production --force
printf'%s'"$DROPBOX_CLIENT_SECRET_DEV"| vercel envadd DROPBOX_CLIENT_SECRET production --force --sensitive
printf'%s'"$DROPBOX_REDIRECT_URI_DEV"| vercel envadd DROPBOX_REDIRECT_URI production --force
vercel deploy --prod --yes
Vercel Prod Update
vercel link --scope rikster1s-projects --project stratofusion-prod --yes
printf'%s'"$DROPBOX_CLIENT_ID_PROD"| vercel envadd DROPBOX_CLIENT_ID production --force
printf'%s'"$DROPBOX_CLIENT_SECRET_PROD"| vercel envadd DROPBOX_CLIENT_SECRET production --force --sensitive
printf'%s'"$DROPBOX_REDIRECT_URI_PROD"| vercel envadd DROPBOX_REDIRECT_URI production --force
vercel deploy --prod --yes
Fly Update
flyctl secrets set -a stratofusion-rclone-dev \DROPBOX_CLIENT_ID="$DROPBOX_CLIENT_ID_DEV"\DROPBOX_CLIENT_SECRET="$DROPBOX_CLIENT_SECRET_DEV"flyctl secrets set -a stratofusion-rclone-prod \DROPBOX_CLIENT_ID="$DROPBOX_CLIENT_ID_PROD"\DROPBOX_CLIENT_SECRET="$DROPBOX_CLIENT_SECRET_PROD"
Dropbox Verification
local sign-in flow returns to http://localhost:3000/api/dropbox.
dev sign-in flow returns to https://dev.stratofusion.io/api/dropbox.
prod sign-in flow returns to https://stratofusion.io/api/dropbox.
Final Verification Sequence
After all three providers are updated:
# Dev projectvercel link --scope rikster1s-projects --project stratofusion-dev --yes
vercel deploy --prod --yes
# Prod projectvercel link --scope rikster1s-projects --project stratofusion-prod --yes
vercel deploy --prod --yes
# Fly paritycd fly-rclone
./deploy.sh --env dev
./deploy.sh --env prod
Then verify:
Google auth works in local, dev, and prod.
OneDrive auth works in local, dev, and prod.
Dropbox auth works in local, dev, and prod.
Existing shared credentials are no longer present in Vercel dev/prod envs.
Existing shared credentials are no longer present in Fly dev/prod secrets.