use db instead of config for key and secret