|
@@ -1,5 +1,6 @@
|
|
|
package com.sxtvs.open.api.odata.controller;
|
|
|
|
|
|
+import cn.hutool.core.util.IdUtil;
|
|
|
import com.sxtvs.open.core.sls.AliyunLogger;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Controller;
|
|
@@ -18,10 +19,11 @@ public class OauthController {
|
|
|
@RequestMapping("douyin/code")
|
|
|
public String douyinQrCode() {
|
|
|
logger.info("key", "douyinQrCode");
|
|
|
+ var state = IdUtil.nanoId();
|
|
|
return "redirect:https://open.douyin.com/platform/oauth/connect/?" +
|
|
|
"client_key=awfrca76s1petwh0&response_type=code&" +
|
|
|
"scope=video.data%2Cfans.list%2Cdata.external.item%2Cdata.external.user%2Cfans.data%2Cvideo.list%2Crenew_refresh_token%2Cuser_info&" +
|
|
|
- "redirect_uri=https%3A%2F%2Fimport.smcic.net%2Fdouyin%2Fcallback-open";
|
|
|
+ "redirect_uri=https%3A%2F%2Fimport.smcic.net%2Fdouyin%2Fcallback-open&state=" + state;
|
|
|
}
|
|
|
|
|
|
@RequestMapping("douyin/callback")
|