diff --git a/drivers/aliyundrive_open/driver.go b/drivers/aliyundrive_open/driver.go index 994361285b9..4029ad57c37 100644 --- a/drivers/aliyundrive_open/driver.go +++ b/drivers/aliyundrive_open/driver.go @@ -80,7 +80,7 @@ func (d *AliyundriveOpen) link(ctx context.Context, file model.Obj) (*model.Link req.SetBody(base.Json{ "drive_id": d.DriveId, "file_id": file.GetID(), - "expire_sec": 900, + "expire_sec": 14400, }) }) if err != nil { @@ -207,7 +207,7 @@ func (d *AliyundriveOpen) Other(ctx context.Context, args model.OtherArgs) (inte case "video_preview": uri = "/adrive/v1.0/openFile/getVideoPreviewPlayInfo" data["category"] = "live_transcoding" - data["url_expire_sec"] = 900 + data["url_expire_sec"] = 14400 default: return nil, errs.NotSupport } diff --git a/server/handles/ssologin.go b/server/handles/ssologin.go index 52486b97839..b71179b6496 100644 --- a/server/handles/ssologin.go +++ b/server/handles/ssologin.go @@ -231,7 +231,7 @@ func OIDCLoginCallback(c *gin.Context) { common.ErrorResp(c, err, 400) return } - userID := utils.Json.Get(payload, conf.SSOOIDCUsernameKey).ToString() + userID := utils.Json.Get(payload, setting.GetStr(conf.SSOOIDCUsernameKey, "name")).ToString() if userID == "" { common.ErrorStrResp(c, "cannot get username from OIDC provider", 400) return