do not allow re-login if already logged in
This commit is contained in:
parent
797d181bea
commit
fa332a6edd
5
auth.go
5
auth.go
@ -20,6 +20,11 @@ type DiscordUser struct {
|
||||
func getLogin(c *gin.Context) {
|
||||
session := sessions.Default(c)
|
||||
|
||||
if session.Get("ID") != nil {
|
||||
c.Redirect(http.StatusTemporaryRedirect, "/")
|
||||
return
|
||||
}
|
||||
|
||||
discordState, err := getRandomString()
|
||||
if err != nil {
|
||||
c.HTML(http.StatusInternalServerError, "error_raw.tmpl", gin.H{
|
||||
|
Loading…
Reference in New Issue
Block a user