-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(core,antd,mui,mantine,chakra-uş): add new prop to auth-page to p…
…ass extra params to auth-provider
- Loading branch information
1 parent
6d224d0
commit b336066
Showing
35 changed files
with
636 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
--- | ||
"@refinedev/chakra-ui": minor | ||
"@refinedev/mantine": minor | ||
"@refinedev/antd": minor | ||
"@refinedev/core": minor | ||
"@refinedev/mui": minor | ||
--- | ||
|
||
feat: added new prop called `mutationVariables` to `<AuthPage />`. #6431 | ||
From now on, you can pass additional parameters to the `authProvider` methods using the `mutationVariables` prop of the `<AuthPage />` component. | ||
|
||
```tsx | ||
import { AuthPage } from "@refinedev/antd"; // or "@refinedev/chakra-ui", "@refinedev/mantine", "@refinedev/mui" | ||
|
||
const MyLoginPage = () => { | ||
return ( | ||
<AuthPage | ||
type="login" // all other types are also supported. | ||
// highlight-start | ||
mutationVariables={{ | ||
foo: "bar", | ||
xyz: "abc", | ||
}} | ||
// highlight-end | ||
/> | ||
); | ||
}; | ||
|
||
// all mutation methods are supported. | ||
const authProvider = { | ||
login: async ({ foo, xyz, ...otherProps }) => { | ||
console.log(foo); // bar | ||
console.log(xyz); // abc | ||
// ... | ||
}, | ||
register: async ({ foo, xyz, ...otherProps }) => { | ||
console.log(foo); // bar | ||
console.log(xyz); // abc | ||
// ... | ||
}, | ||
// ... | ||
}; | ||
``` | ||
|
||
[Resolves #6431](https://github.com/refinedev/refine/issues/6431) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.