Skip to content

Commit

Permalink
simplify method
Browse files Browse the repository at this point in the history
  • Loading branch information
tsawler committed Sep 21, 2022
1 parent e161b13 commit dce6d12
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions jot.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ func (j *Auth) GenerateTokenPair(user *User) (TokenPairs, error) {
// GetRefreshCookie returns a cookie containing the refresh token. Note that the cookie is http only, secure,
// and set to same site strict mode.
func (j *Auth) GetRefreshCookie(refreshToken string) *http.Cookie {
c := &http.Cookie{
return &http.Cookie{
Name: j.CookieName,
Path: j.CookiePath,
Value: refreshToken,
Expand All @@ -160,8 +160,6 @@ func (j *Auth) GetRefreshCookie(refreshToken string) *http.Cookie {
HttpOnly: true,
Secure: true,
}

return c
}

// GetExpiredRefreshCookie is a convenience method to return a cookie suitable for forcing a user's browser
Expand Down

0 comments on commit dce6d12

Please sign in to comment.