Skip to content

Commit ca7630c

Browse files
committed
Fix auth
1 parent fb2577f commit ca7630c

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/utils/auth.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ export async function login(username: string, password: string) {
122122
variables: { username, password },
123123
});
124124

125-
const { authToken, refreshToken, customer } = data.loginWithCookies;
125+
const { authToken, refreshToken, customer } = data.login;
126126

127127
if (!authToken || !refreshToken || !customer.sessionToken) {
128128
throw new Error('Failed to retrieve credentials.');

src/utils/gql/GQL_MUTATIONS.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,7 @@ export const CREATE_USER = gql`
3030

3131
export const LOGIN_USER = gql`
3232
mutation Login($username: String!, $password: String!) {
33-
loginWithCookies(input: { login: $username, password: $password }) {
34-
status
33+
login(input: { username: $username, password: $password }) {
3534
authToken
3635
refreshToken
3736
customer {

0 commit comments

Comments
 (0)