func signIn(r *agoltools.Request) (err error) { authUrl := portalAuthorizeUrl if redirect := r.R.FormValue("redirect"); strings.HasPrefix(redirect, "/") { redirect = url.QueryEscape(redirect) authUrl += "&state=" + redirect } r.Redirect(authUrl) return nil }
func signOut(r *agoltools.Request) (err error) { r.SignOut() r.Redirect("/") return nil }