package controllers;

import play.mvc.Controller;
import play.mvc.Result;
import views.html.confighelper;
import views.html.index;

/**
 * This controller contains an action to handle HTTP requests
 * to the application's home page.
 */
public class HomeController extends Controller {

    /**
     * Renders the main home page and provides the Gnag client ID used to create the GitHub authentication
     * link.
     * @return
     */
    public Result index() {
        return ok(index.render());
    }

    /**
     * Will show the page for generating a Gradle config for a specific project. If the user has not authorized GitHub
     * this will redirect to start the authentication flow.
     * @return
     */
    public Result configHelper() {
        if (session(GitHubAuthController.TOKEN_KEY) == null) {
            return redirect("/startAuth");
        } else {
            return ok(confighelper.render(session(GitHubAuthController.TOKEN_KEY)));
        }
    }

}
@@ -455,24 +455,82 @@
 t index() %7B%0A
+        session().remove(GitHubAuthController.TOKEN_KEY);%0A
         retu

Remove token from session once back on the index page