[codex] extract authentication packages#167
Merged
Merged
Conversation
…ry integration - Updated pnpm workspace to include the new Next.js App Router example. - Created a new example project in `examples/nextjs-app-router` demonstrating the use of `@ic-reactor` features. - Added necessary configuration files including `package.json`, `next.config.js`, and `postcss.config.js`. - Implemented authentication and todo list functionality with proper state management. - Included TypeScript definitions and declarations for the todo canister. - Set up Tailwind CSS for styling and added global styles. - Created components for authentication and todo list management. - Ensured hydration safety by isolating state initialization within client components.
… in Next.js example
…tion or class' Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
…tion or class' Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
- Updated useActorMutation, useActorQuery, useActorSuspenseQuery, and useActorSuspenseInfiniteQuery hooks to use generic Service and Method types instead of specific Actor types. - Introduced defineReactor function for streamlined reactor and hook initialization, allowing for shared ClientManager and QueryClient across multiple reactors. - Added AuthClientLoader and AuthStateStore for improved authentication state management. - Enhanced type definitions for better clarity and usability across the library. - Added tests for defineReactor to ensure correct initialization and functionality.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9858a9d511
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…c workflow - Set node version to 22.22.2 and enable linking of local workspace packages in pnpm workspace. - Introduced a GitHub Actions workflow to sync example versions after releases, ensuring examples use the latest published versions. - Added type-checking script for examples to validate against locally built packages. - Created a new TypeScript environment declaration file for the all-in-one demo example.
…owser and Node environments
- Added titles to various type alias documentation files for better clarity. - Updated links in documentation to point to the latest commit. - Improved formatting of type definitions in documentation for consistency. - Introduced new classes: AuthClientLoader and AuthStateStore, with detailed documentation and examples. - Added type alias AuthClientConstructor with corresponding documentation.
- Updated @ic-reactor/vite-plugin to version 0.11.1 in multiple examples. - Refactored backend declarations to use consistent property naming conventions. - Added generated files for backend services in codegen-in-action and vite-plugin-demo examples. - Updated package.json files to reflect new dependency versions across examples. - Improved Vite configuration for icp-reactor-demo and vite-plugin-demo examples. - Removed obsolete files and ensured proper structure for generated hooks and declarations.
- Add SVG logos for ICP and Vite. - Create App component with form to greet user via backend canister. - Implement CSS styles for layout and branding. - Set up TypeScript declarations and backend service definitions. - Configure Vite with React and IC Reactor plugin. - Establish client manager for query handling. - Add global styles and theme variables for light/dark modes.
…h dynamic method discovery and auto-detection of query types
…laration generation for ic-reactor-demo
…r declaration formatting, and fix key serialization in suspense tests
…ion, and secure root key handling
…d migrate local environment settings to agentOptions
…ugin and standardized hook generation
…cy across projects
…tion or class' Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces and documents new authentication packages for the IC Reactor project, refactors authentication-related usage in documentation to use the new
AuthenticationManagerand related hooks, and updates references and examples throughout the docs for clarity and separation of concerns. It also adds new documentation for theAuthenticationManagerclass and improves the accuracy of file references in the generated documentation.Authentication package additions and documentation:
@ic-reactor/authand@ic-reactor/auth-reactpackages to the workspace and documentation, providing Internet Identity authentication and React hooks for authentication, respectively. [1] [2] [3]AuthenticationManagerclass, detailing its API, usage, and methods.Refactoring authentication usage in documentation:
README.mdand docs to useAuthenticationManagerfrom@ic-reactor/authand the newcreateAuthHooksfrom@ic-reactor/auth-react, instead of passingClientManagerdirectly. [1] [2] [3] [4] [5] [6] [7] [8]IdentityAttributesManagerandcreateIdentityAttributeHooksfor OpenID attributes, and clarified direct usage of attribute APIs. [1] [2]Documentation accuracy and cleanup:
CallError,CanisterError, andClientManagerto match the new project structure and improve clarity. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12]