fix: Improve handling of suspended users signing in with email (#2012)
* chore: Separate signin/auth middleware fix: Email signin token parsed by JWT middleware fix: Email signin marked as active when logging in as suspended fix: Suspended email signin correctly redirected to login screen closes #1740 * refactor middleware -> lib * lint
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
// @flow
|
||||
import { type Context } from "koa";
|
||||
import { User, Team } from "./models";
|
||||
import { User } from "./models";
|
||||
|
||||
export type ContextWithState = {|
|
||||
...$Exact<Context>,
|
||||
@ -10,13 +10,3 @@ export type ContextWithState = {|
|
||||
authType: "app" | "api",
|
||||
},
|
||||
|};
|
||||
|
||||
export type ContextWithAuthMiddleware = {|
|
||||
...$Exact<ContextWithState>,
|
||||
signIn: (
|
||||
user: User,
|
||||
team: Team,
|
||||
providerName: string,
|
||||
isFirstSignin: boolean
|
||||
) => void,
|
||||
|};
|
||||
|
Reference in New Issue
Block a user