Overview
This feature implements the Invisible SDK into our Next.js frontend to enable seamless, secure user authentication. The integration will allow the app to automatically detect users and manage their session without traditional logins or wallet connections, reducing friction during the onboarding process. 🚀
Background
Authentication can be a major barrier in Web3 applications. By integrating the Invisible SDK, we simplify the process and offer a streamlined, secure user experience. This aligns with our goal at Block Party to make blockchain more accessible, especially for non-crypto-native users.
Implementation Details
-
SDK Integration
- Use the latest version of the Invisible SDK from npm.
- Initialize the SDK early on app load (e.g., in the root component or layout) by calling
Invisible.init().
-
Configuration
- Securely configure app ID, secret key, and environment variables via
.env files. Do not hardcode these values.
-
User Session Management
- Utilize lifecycle methods (e.g.,
useEffect in React) to detect the user session and retrieve identity when the page loads.
- Store user data in a global state management tool (Redux, Context, or Zustand) for accessibility throughout the app.
- Ensure that the UI displays the auto-detected user identity/status without any manual login buttons.
-
Error & Loading States
- Handle loading states gracefully in cases where user identity takes time to resolve.
- Optionally integrate toast notifications or similar feedback if the SDK fails to detect the identity.
Technical Considerations
- Ensure that the integration does not break the app behavior if the Invisible SDK is unavailable.
- Use proper error handling for network or SDK-related errors.
- Ensure that the SDK initialization and configuration work seamlessly with the Next.js architecture.
Definition of Done
For more context on our project, please refer to the BlockParty README. 😊
Overview
This feature implements the Invisible SDK into our Next.js frontend to enable seamless, secure user authentication. The integration will allow the app to automatically detect users and manage their session without traditional logins or wallet connections, reducing friction during the onboarding process. 🚀
Background
Authentication can be a major barrier in Web3 applications. By integrating the Invisible SDK, we simplify the process and offer a streamlined, secure user experience. This aligns with our goal at Block Party to make blockchain more accessible, especially for non-crypto-native users.
Implementation Details
SDK Integration
Invisible.init().Configuration
.envfiles. Do not hardcode these values.User Session Management
useEffectin React) to detect the user session and retrieve identity when the page loads.Error & Loading States
Technical Considerations
Definition of Done
For more context on our project, please refer to the BlockParty README. 😊