feat: redirect to frontend landing page
This commit is contained in:
parent
d45d958ea1
commit
1cd3620bdb
@ -3,11 +3,11 @@ package oauth
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
userApi "git.0x7f.app/WOJ/woj-server/internal/api/user"
|
||||
"git.0x7f.app/WOJ/woj-server/internal/e"
|
||||
"git.0x7f.app/WOJ/woj-server/internal/model"
|
||||
"git.0x7f.app/WOJ/woj-server/internal/service/user"
|
||||
"github.com/gin-gonic/gin"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// CallbackHandler
|
||||
@ -109,6 +109,8 @@ func (h *handler) CallbackHandler() gin.HandlerFunc {
|
||||
return
|
||||
}
|
||||
|
||||
e.Pong(c, status, userApi.LoginResponse{Token: jwt, NickName: u.NickName})
|
||||
// TODO: Figure out a better way to cooperate with frontend
|
||||
c.Redirect(http.StatusFound, "/login?redirect_token="+jwt)
|
||||
// e.Pong(c, status, userApi.LoginResponse{Token: jwt, NickName: u.NickName})
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user