this project contains all react components for the Aro-ko authentication platform
npm install @mofogasy70/react-authythis project contains all react components for the Aro-ko authentication platform
-LogWith(button to authenticate with Aro-ko platform)
- you must have a token decoding module to decode response token, for example: jwtDecode from jwt-decode.
- the info parameter must contain the attributes you need (Name,LastName,...).
- the callbak function receives a function (responseAuth) to execute after the authentication has succeeded and sends the data in the argument (response:any|decode) of this one.
- This still contains a lot of parameters but these are the most essential.
``tsx``
import { LogWith } from "@mofogasy70/react-authy";
import jwtDecode from "jwt-decode";
const responseAuth = (response:any) => {
let decode:any;
try {
decode=jwtDecode(response);
} catch (error) {
alert(error);
}
}
export default function LogWithExample() {
return (
callback={responseAuth}
/>
);
}
thanks you for using Aro-ko platform.