Don't fully reset session with using /auth
This commit is contained in:
parent
14a1edee57
commit
e4a26e7c96
|
@ -492,13 +492,13 @@ func (h *mainHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||||
state := util.RandStringBytes(16)
|
state := util.RandStringBytes(16)
|
||||||
redirectURI := fmt.Sprintf("%s/session/callback", os.Getenv("EKSTER_BASEURL"))
|
redirectURI := fmt.Sprintf("%s/session/callback", os.Getenv("EKSTER_BASEURL"))
|
||||||
|
|
||||||
sess := session{
|
sess, err := loadSession(sessionVar, conn)
|
||||||
AuthorizationEndpoint: endpoints.AuthorizationEndpoint,
|
|
||||||
Me: meURL.String(),
|
sess.AuthorizationEndpoint = endpoints.AuthorizationEndpoint
|
||||||
State: state,
|
sess.Me = meURL.String()
|
||||||
RedirectURI: redirectURI,
|
sess.State = state
|
||||||
LoggedIn: false,
|
sess.RedirectURI = redirectURI
|
||||||
}
|
sess.LoggedIn = false
|
||||||
saveSession(sessionVar, &sess, conn)
|
saveSession(sessionVar, &sess, conn)
|
||||||
|
|
||||||
authenticationURL := indieauth.CreateAuthenticationURL(*authURL, meURL.String(), ClientID, redirectURI, state)
|
authenticationURL := indieauth.CreateAuthenticationURL(*authURL, meURL.String(), ClientID, redirectURI, state)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user