How do I pass query params from UpdatePasswordPage to updatePassword function in authProvider
How do I pass query params from UpdatePasswordPage to updatePassword function in authProvider?
3 Replies
Hi @chachi. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
----------------------
In Refine, the
updatePassword
method in the authProvider
can take query parameters as arguments from the URL. If we assume that the URL is <http://localhost:3000/reset-password?token=123
,> the updatePassword
method will get the mutation's parameters as arguments and the token
query parameter as well.
Here is an example of how you can define the updatePassword
method in your authProvider
:
In this example, the updatePassword
method is an async function that takes an object as its argument. This object contains the password
, confirmPassword
, and token
properties. The token
property is the query parameter from the URL.
For more information, you can refer to the Refine documentation (https://refine.dev/docs/authentication/auth-provider#updatepassword).
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------<@95552725294518272> kapa.ai is still learning and improving, please let us know how it did by reacting below
afraid-scarlet•8mo ago
Hello @chachi, all mutation parameters will be sent to updatePasswords
`