Auth provider for refine with Kinde. refine is a React-based framework for building internal tools, rapidly. Kinde is auth provider for easy authentications.
npm install @refine-auth/kinde-react


!GitHub Repo stars
!Code Climate maintainability
@refine-auth/kinde-react is an auth provider for refine to integrate kinde authentication.
You can install the library using npm or yarn:
``sh
npm install @refine-auth/kinde-reactor
yarn add @refine-auth/kinde-react
`
Import the Kinde Provider component and wrap your application in it.
`jsx
import { RefineKindeProvider } from "@refine-auth/kinde-react";
domain="KINDE_DOMAIN"
logoutUri={window.location.origin}
redirectUri={window.location.origin}
>
`
To use authProvider with Refine App, use Hook.
`jsx
import { useAuthProvider } from "@refine-auth/kinde-react";
const App = () => {
const { authProvider } = useAuthProvider();
return (
/ ... /
>
{/ ... /}
);
};
`
, we just need to use login method.`jsx
import { useLogin } from "@refinedev/core";const { mutate: login } = useLogin();
// *
`Properties
The
useAuthProvider hook returns the following properties:-
authProvider (AuthProvider): Object with methods from AuthBinding of refine.-
isLoading (boolean): A flag that indicates whether authentication is currently being loaded or fetched. You can use this property to conditionally render loading indicators or content.-
token` (string): Represents authentication token, to be used for API authentications.