Skip to content

Commit a8da019

Browse files
committed
Don't sign in if email unverified
1 parent e61bf8a commit a8da019

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

API/Controller/OAuth/SignupFinalize.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,11 @@ public async Task<IActionResult> OAuthSignupFinalize(
110110
return Problem(SignupError.UsernameOrEmailExists);
111111
}
112112

113-
// Authenticate the client (create session and set session cookie)
114-
await CreateSession(newUser.Value.Id, domain);
113+
// Authenticate the client if its activated (create session and set session cookie)
114+
if (newUser.Value.ActivatedAt is not null)
115+
{
116+
await CreateSession(newUser.Value.Id, domain);
117+
}
115118

116119
// Clear the temporary OAuth flow cookie.
117120
await HttpContext.SignOutAsync(OAuthConstants.FlowScheme);

0 commit comments

Comments
 (0)