mirror of
https://github.com/documenso/documenso.git
synced 2025-11-20 03:32:14 +10:00
fix: wip
This commit is contained in:
@ -53,8 +53,16 @@ export class AuthClient {
|
||||
}
|
||||
|
||||
public emailPassword = {
|
||||
signIn: async (data: TEmailPasswordSignin) => {
|
||||
const response = await this.client['email-password'].authorize.$post({ json: data });
|
||||
signIn: async (data: Omit<TEmailPasswordSignin, 'csrfToken'>) => {
|
||||
const { csrfToken } = await this.client.csrf.$get().then(async (res) => res.json());
|
||||
|
||||
const response = await this.client['email-password'].authorize.$post({
|
||||
json: {
|
||||
...data,
|
||||
csrfToken,
|
||||
},
|
||||
});
|
||||
|
||||
await this.handleError(response);
|
||||
|
||||
handleSignInRedirect(data.redirectPath);
|
||||
|
||||
Reference in New Issue
Block a user