![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
@corbado/react
Advanced tools
This package provides all the functionalities and UI components needed by developers when integration Corbado's Authentication management system in their react application
The @corbado/react
package provides a comprehensive solution for integrating passkey-based authentication in React applications.
It simplifies the process of managing authentication states and user sessions with easy-to-use hooks and UI components.
>=18.17.0
or laternpm install @corbado/react
Add CorbadoProvider
to your main App component to wrap your application:
import { CorbadoProvider } from '@corbado/react';
function App() {
return (
<CorbadoProvider projectId='pro-XXXXXXXXXXXXXXXXXXXX'>
{/* Your routes and other components go here */}
</CorbadoProvider>
);
}
export default App;
Adding SignUp/Login screens is simple with @corbado/react
.
The CorbadoAuth
component allows your users to signUp and login with their passkeys.
Additionally, it provides fallback options like email one-time passcode for users who don't have a passkey yet.
import { CorbadoAuth } from '@corbado/react';
const AuthPage = () => {
const onLoggedIn = () => {
// Navigate or perform actions after successful login
};
return <CorbadoAuth onLoggedIn={onLoggedIn} />;
};
export default AuthPage;
Users that are logged in want to see a list of all their existing passkeys and they want to manage them.
You can make this possible by using the PasskeyList
component.
It shows all passkeys of the currently logged in user and allows them to add and remove passkeys.
import { PasskeyList } from '@corbado/react';
const PasskeysView = () => {
// Additional logic or styling
return (
<div>
<PasskeyList />
</div>
);
};
export default PasskeysView;
Utilize the useCorbado
hook to access authentication states like user
and shortSession
.
Use user
to show information about the currently logged in user (e.g. name and email). If the user is not logged in this value is undefined
.
Use shortSession
as a token to authenticate against your backend API (if you have one).
import { useCorbado } from '@corbado/react-sdk';
const HomePage = () => {
const { user, shortSession, loading } = useCorbado();
if (loading) {
// Render loading state
}
if (user) {
// Render authenticated state
}
// Additional implementation
};
export default HomePage;
Remember to check loading
state of the hook before using authentication states.
Implement logout functionality easily with the logout
method from the useCorbado
hook:
import { useCorbado } from '@corbado/react-sdk';
const LogoutButton = () => {
const { logout } = useCorbado();
const handleLogout = () => {
logout();
// Redirect or perform additional actions after logout
};
// UI logic and styling for logout button
};
export default LogoutButton;
@corbado/react
package checkout the example application and its source codeFor support and questions please visit our Slack channel. For more detailed information and advanced configuration options, please visit our Documentation Page.
This project is licensed under the MIT License - see the LICENSE file for details.
FAQs
This package provides all the functionalities and UI components needed by developers when integration Corbado's Authentication management system in their react application
The npm package @corbado/react receives a total of 0 weekly downloads. As such, @corbado/react popularity was classified as not popular.
We found that @corbado/react demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.