mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
oauth: delete session key instead of set to empty
Adds the Delete function to the Session wrapper so that the Macaron function for deleting keys from a Session can be used. https://go-macaron.com/docs/middlewares/session#implement-provider-interface
This commit is contained in:
@@ -36,7 +36,7 @@ func LoginView(c *middleware.Context) {
|
||||
viewData.Settings["disableLoginForm"] = setting.DisableLoginForm
|
||||
|
||||
if loginError, ok := c.Session.Get("loginError").(string); ok {
|
||||
c.Session.Set("loginError", "") // TODO: is there a proper way to delete a session var?
|
||||
c.Session.Delete("loginError")
|
||||
viewData.Settings["loginError"] = loginError
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user