loginWithPasswordMutation
loginWithPasswordMutation(
variables
,init
?):Promise
<TypedResponse
<Response
>>
Low-level function for making a loginWithPasswordMutation
request.
Parameters
• variables: Variables
• init?: RequestInit
Returns
Promise
<TypedResponse
<Response
>>
Remarks
There are many things that can go wrong with this request and Khan Academy doesn't provide a great way to handle them. It's recommended to use Client.login instead.
Link
See
Example
Simple usage without error handling:
const response = await mutations.loginWithPasswordMutation({
identifier: 'username', // or email
password: 'password',
})
const cookies = response.headers.get('set-cookie')