Implemented phase 5 for the POC prototype in the Website service.
This commit is contained in:
1 parent
89a7a7b8e5
commit
31d2d98d49
46 files changed
+4039
-162
No files matched your search
@@ -194,8 +194,13 @@ private extension SessionController {
|
||||
)
|
||||
}
|
||||
|
||||
let token = await sessions.start(for: try await accounts.account(email: email))
|
||||
var response = Response.redirect(to: returnPath, type: .normal)
|
||||
let account = try await accounts.signIn(email: email)
|
||||
let token = await sessions.start(for: account.user)
|
||||
// A new account picks its display name before going on.
|
||||
var response = Response.redirect(
|
||||
to: account.isNew ? .Route.welcome(returningTo: returnPath) : returnPath,
|
||||
type: .normal
|
||||
)
|
||||
|
||||
response.setCookie(SessionStore.cookie(token, isSecure: isSecure))
|
||||
|
||||
|
||||
Reference in new issue
Block a user