Skip to content

Instantly share code, notes, and snippets.

@Aaron2963
Last active March 5, 2024 09:08
Show Gist options
  • Save Aaron2963/1654711b2c0686e4dd4b23723d3cc800 to your computer and use it in GitHub Desktop.
Save Aaron2963/1654711b2c0686e4dd4b23723d3cc800 to your computer and use it in GitHub Desktop.
SecretCodeSet: 與各應用服務串接使用之金鑰碼、設定值
{
"totp": {
"secret": "FDE393FE83ACAFEDAD3BC2931",
"timeOffset": -48392
},
"line": {
"accessToken": "xxxxxxx....",
"refreshToken": "xxxxxxx...."
},
"lineNotify": {
"accessToken": "xxxxxxx...."
},
"facebook": {
"accessToken": "xxxxxxx....",
"refreshToken": "xxxxxxx...."
},
"google": {
"accessToken": "xxxxxxx....",
"refreshToken": "xxxxxxx...."
}
}
@Aaron2963
Copy link
Author

{ "facebook": { "id": "248652415597752", "accessToken": "xxxxxxx...." }, "google": { "id": "107807511758741549898", "accessToken": "xxxxxxx...." } }

這個是要加上去的嗎?

@cody-ds
Copy link

cody-ds commented Mar 4, 2024

綜合google
{
"totp": {
"secret": "FDE393FE83ACAFEDAD3BC2931",
"timeOffset": -48392
},
"line": {
"id": "Uc024c41352524052525e330ec336d4be1",
"Token": ""
},
"lineNotify": {
"id": "Uc024c41352524052525e330ec336d4be1",
"Token": ""
},
"facebook": {
"id": "248652415597752",
"accessToken": "xxxxxxx...."
},
"google": {
"id": "107807511758741549898",
"accessToken": "xxxxxxx...."
}
}

@Aaron2963
Copy link
Author

另外,補充一點,LINE Notify 跟 LINE 的 OAuth 令牌不互通,所以如果兩者要並存,可能需要另存一個項目

@allen-fu-test
Copy link

allen-fu-test commented Mar 4, 2024

facebook id 之前是透過第三方登入呼叫facebook api
https://graph.facebook.com/v2.6/me?fields=name,email,gender....
傳入accesstoken回傳的參數
{"id": "xxxxxxxx", "email": "xxxxxxxxx"}

@Aaron2963
Copy link
Author

  1. line.Token, lineNotify.Token 這兩個鍵不走小寫駝峰有特別的意思嗎?
  2. tokenaccessToken 在意思上有區別嗎? 除了 TOTP 以外,其他都是 OAuth

@cody-ds
Copy link

cody-ds commented Mar 5, 2024

去掉id ,新增refreshToken 後,如下:
{
"totp": {
"secret": "FDE393FE83ACAFEDAD3BC2931",
"timeOffset": -48392
},
"line": {
"accessToken": "xxxxxxx....",
"refreshToken": "xxxxxxx...."
},
"lineNotify": {
"accessToken": "xxxxxxx...."
},
"facebook": {
"accessToken": "xxxxxxx....",
"refreshToken": "xxxxxxx...."
},
"google": {
"accessToken": "xxxxxxx....",
"refreshToken": "xxxxxxx...."
}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment