update pagination

This commit is contained in:
Kenta420-Poom 2023-09-25 15:29:42 +07:00
parent 3f399dda0e
commit 51642983c6
15 changed files with 1049 additions and 240 deletions

View file

@ -90,7 +90,7 @@ func (ar *AuthRouter) Route(r chi.Router) {
// redirect to frontend with token and refresh token
w.Header().Add("set-cookie", "access_token="+token.AccessToken+"; Path=/; HttpOnly; SameSite=None; Secure; Max-Age=3600")
w.Header().Add("set-cookie", "refresh_token="+token.RefreshToken+"; Path=/; HttpOnly; SameSite=None; Secure")
http.Redirect(w, r, ar.cfg.ClientRedirectURL+"/callback?"+value.Encode(), http.StatusTemporaryRedirect)
http.Redirect(w, r, ar.cfg.ClientRedirectURL+"/?"+value.Encode(), http.StatusTemporaryRedirect)
})
r.Get("/refresh", func(w http.ResponseWriter, r *http.Request) {
@ -110,7 +110,7 @@ func (ar *AuthRouter) Route(r chi.Router) {
}
// redirect to frontend with token and refresh token
http.Redirect(w, r, ar.cfg.ClientRedirectURL+"/callback?token="+token.AccessToken+"&redirect_to="+redirectTo, http.StatusTemporaryRedirect)
http.Redirect(w, r, ar.cfg.ClientRedirectURL+"/?token="+token.AccessToken+"&redirect_to="+redirectTo, http.StatusTemporaryRedirect)
})
r.Get("/revoke", func(w http.ResponseWriter, r *http.Request) {