mirror of
https://github.com/0rangebananaspy/authelia.git
synced 2024-09-14 22:47:21 +07:00
689fd7cb95
We now extend the default Eslint configuration and enforce styling with prettier for all of our frontend code.
17 lines
525 B
TypeScript
17 lines
525 B
TypeScript
import { CompleteTOTPSignInPath } from "./Api";
|
|
import { PostWithOptionalResponse } from "./Client";
|
|
import { SignInResponse } from "./SignIn";
|
|
|
|
interface CompleteU2FSigninBody {
|
|
token: string;
|
|
targetURL?: string;
|
|
}
|
|
|
|
export function completeTOTPSignIn(passcode: string, targetURL: string | undefined) {
|
|
const body: CompleteU2FSigninBody = { token: `${passcode}` };
|
|
if (targetURL) {
|
|
body.targetURL = targetURL;
|
|
}
|
|
return PostWithOptionalResponse<SignInResponse>(CompleteTOTPSignInPath, body);
|
|
}
|