Skip to content

Commit

Permalink
fix(frontend): fix authenticate endpoint to create new session on red…
Browse files Browse the repository at this point in the history
…irect (#6036)
  • Loading branch information
aditya-radhakrishnan authored Sep 23, 2022
1 parent 722be5d commit 011421d
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,10 @@ public Result authenticate(Http.Request request) {
// 3. If no auth enabled, fallback to using default user account & redirect.
// Generate GMS session token, TODO:
final String accessToken = _authClient.generateSessionTokenForUser(DEFAULT_ACTOR_URN.getId());
request.session().adding(createSessionMap(DEFAULT_ACTOR_URN.toString(), accessToken));
return redirect(redirectPath).withCookies(createActorCookie(DEFAULT_ACTOR_URN.toString(),
_configs.hasPath(SESSION_TTL_CONFIG_PATH) ? _configs.getInt(SESSION_TTL_CONFIG_PATH)
: DEFAULT_SESSION_TTL_HOURS));
return redirect(redirectPath).withSession(createSessionMap(DEFAULT_ACTOR_URN.toString(), accessToken))
.withCookies(createActorCookie(DEFAULT_ACTOR_URN.toString(),
_configs.hasPath(SESSION_TTL_CONFIG_PATH) ? _configs.getInt(SESSION_TTL_CONFIG_PATH)
: DEFAULT_SESSION_TTL_HOURS));
}

/**
Expand Down

0 comments on commit 011421d

Please sign in to comment.