Skip to content

Commit

Permalink
docs: remove finished TODO
Browse files Browse the repository at this point in the history
  • Loading branch information
peterxcli committed Jan 15, 2024
1 parent e2817a3 commit 6544d5e
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 4 deletions.
2 changes: 0 additions & 2 deletions pkg/controller/oauth_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ func (ctrl *OAuthController) LineLogin(c *gin.Context) {
log.Println("originalUrl:", originalUrl)
serverURL := ctrl.env.Line.ServerUrl
scope := "profile openid" //profile | openid | email
// TODO: add some random string to state
state := originalUrl + "$" + social.GenerateNonce()
if len(state) == 0 {
c.AbortWithStatusJSON(http.StatusBadRequest, model.Response{
Expand Down Expand Up @@ -83,7 +82,6 @@ func (ctrl *OAuthController) LineLoginCallback(c *gin.Context) {
return
}
log.Println("code:", code, " stateInCookie:", stateInCookie)
// TODO: remove the random string from state
frontendURL := strings.Split(stateInCookie, "$")[0]
token, err := ctrl.lineSocialClient.GetAccessToken(fmt.Sprintf("%s/line-login/callback", serverURL), code).Do()
if err != nil {
Expand Down
2 changes: 0 additions & 2 deletions pkg/controller/user_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,6 @@ func (ctrl *UserController) RefreshToken(c *gin.Context) {
return
}

// TODO: DO we need to check if the user is still active or any other things?

accessToken, err := ctrl.userSvc.CreateAccessToken(c, identity, ctrl.env.JWT.AccessTokenSecret, ctrl.env.JWT.AccessTokenExpiry)
if err != nil {
c.AbortWithStatusJSON(http.StatusInternalServerError, model.Response{
Expand Down

0 comments on commit 6544d5e

Please sign in to comment.