我正在尝试实现此插件https://github.com/Festify/cordova-spotify-oauth
https://github.com/Festify/cordova-spotify-oauth/blob/develop/oauth-token-api/spotifyTokenService.js
CLIENT_ID="got from spotify dev account"
CLIENT_SECRET="got from spotify dev account"
CLIENT_CALLBACK_URL="my-app://callback"
ENCRYPTION_SECRET="<Secret used to encrypt the refresh token - please generate>"
在上述env变量中,无论我在 ENCRYPTION_SECRET 中输入什么内容,它总是会引发错误,如下所示:
TypeError: Bad input string
at TypeError (native)
at Decipher.update (crypto.js:146:26)
at Object.module.exports.decrypt (/user_code/lib/crypto.js:14:21)
at exports.refreshToken.functions.https.onRequest (/user_code/index.js:104:31)
at cloudFunction (/user_code/node_modules/firebase-functions/lib/providers/https.js:37:41)
at /var/tmp/worker/worker.js:689:7
at /var/tmp/worker/worker.js:673:9
at _combinedTickCallback (internal/process/next_tick.js:73:7)
at process._tickDomainCallback (internal/process/next_tick.js:128:9)
我尝试过:
谢谢。
答案 0 :(得分:0)
加密密钥可以是任何您想要的密钥,它只是确保刷新令牌通信安全的密钥。