Skip to content

docs(example): restructure example app into per-feature hooks and class demos - #1655

Merged
subhankarmaiti merged 1 commit into
v6-developmentfrom
chore/rebuild-example-app
Sep 11, 2026
Merged

docs(example): restructure example app into per-feature hooks and class demos#1655
subhankarmaiti merged 1 commit into
v6-developmentfrom
chore/rebuild-example-app

Conversation

@subhankarmaiti

Copy link
Copy Markdown
Contributor

Rebuilds the example app into a single, feature-complete reference that demonstrates every SDK capability, organized section by section. Each feature has a hooks version wired up and running, plus a class-based version kept alongside as unused reference code, so consumers can compare both approaches.

Navigation is dropped in favor of a single sectioned ScrollView. Web stays a separate single-file example limited to web-supported features. No custom styling beyond spacing — just the default React Native components.

Sections: Web Auth, Credentials Manager, Direct Auth API, Passwordless, MFA, My Account API, Passkeys, and Advanced tokens.

This also removes the now-unused react-navigation dependencies from the example workspace.

@coderabbitai

coderabbitai Bot commented Sep 7, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 4377185c-0a8c-41dc-a22b-90a599dced6d

📥 Commits

Reviewing files that changed from the base of the PR and between 7641cef and 3f3b8aa.

⛔ Files ignored due to path filters (1)
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (44)
  • example/README.md
  • example/package.json
  • example/src/App.tsx
  • example/src/App.web.tsx
  • example/src/api/auth0.ts
  • example/src/components/Button.tsx
  • example/src/components/Header.tsx
  • example/src/components/LabeledInput.tsx
  • example/src/components/Result.tsx
  • example/src/components/UserInfo.tsx
  • example/src/features/AdvancedTokensClass.tsx
  • example/src/features/AdvancedTokensHooks.tsx
  • example/src/features/CredentialsClass.tsx
  • example/src/features/CredentialsHooks.tsx
  • example/src/features/DirectAuthClass.tsx
  • example/src/features/DirectAuthHooks.tsx
  • example/src/features/MfaClass.tsx
  • example/src/features/MfaHooks.tsx
  • example/src/features/MyAccountClass.tsx
  • example/src/features/MyAccountHooks.tsx
  • example/src/features/PasskeysClass.tsx
  • example/src/features/PasskeysHooks.tsx
  • example/src/features/PasswordlessClass.tsx
  • example/src/features/PasswordlessHooks.tsx
  • example/src/features/WebAuthClass.tsx
  • example/src/features/WebAuthHooks.tsx
  • example/src/navigation/AuthStackNavigator.tsx
  • example/src/navigation/ClassDemoNavigator.tsx
  • example/src/navigation/HooksDemoNavigator.tsx
  • example/src/navigation/MainTabNavigator.tsx
  • example/src/navigation/RootNavigator.tsx
  • example/src/screens/SelectionScreen.tsx
  • example/src/screens/class-based/ClassApiTests.tsx
  • example/src/screens/class-based/ClassLogin.tsx
  • example/src/screens/class-based/ClassProfile.tsx
  • example/src/screens/hooks/CredentialsScreen.tsx
  • example/src/screens/hooks/Home.tsx
  • example/src/screens/hooks/More.tsx
  • example/src/screens/hooks/MyAccountScreen.tsx
  • example/src/screens/hooks/Profile.tsx
  • example/src/shared/ResultView.tsx
  • example/src/shared/Section.tsx
  • example/src/shared/api.ts
  • example/webpack.config.js

📝 Summary

Summary by CodeRabbit

  • New Features
    • Added an example app showcasing authentication, credentials, passwordless login, MFA, passkeys, account management, advanced tokens, and web authentication.
    • Added reusable sections and formatted result/error displays for demo interactions.
    • Added side-by-side class-based reference examples for supported authentication scenarios.
  • Documentation
    • Documented how to run the web example and described its layout and platform-specific features.
  • Changes
    • Replaced the previous navigation-based demo flow with a single scrollable feature showcase.

Walkthrough

The example app replaces React Navigation screens with a root Auth0Provider and a scrollable layout of eight hooks-based feature demonstrations. It adds class-based reference components, shared result and section components, removes legacy screens and dependencies, and documents the new layout.

Changes

Example application migration

Layer / File(s) Summary
Shared demo foundation
example/src/shared/*, example/src/api/auth0.ts, example/src/components/*
Adds shared Auth0, section, and result components. Removes obsolete shared UI components.
Authentication feature demonstrations
example/src/features/WebAuth*, DirectAuth*, Passwordless*, Passkeys*
Adds hooks-based demonstrations and class-based references for authentication and passkey flows.
Credentials, MFA, and account demonstrations
example/src/features/Credentials*, Mfa*, MyAccount*, AdvancedTokens*
Adds demonstrations for credentials, MFA, My Account, custom token exchange, and DPoP operations.
Root layout and package wiring
example/src/App.tsx, example/package.json, example/webpack.config.js, example/README.md
Mounts the provider and feature sections directly. Removes navigation dependencies and documents the new layout.
Legacy navigation and screen removal
example/src/navigation/*, example/src/screens/*
Deletes the previous navigators, selection screen, and feature screens.

Estimated code review effort: 4 (Complex) | ~45 minutes

Change: Other

Suggested reviewers: nandanprabhu

Sequence Diagram(s)

sequenceDiagram
  participant App
  participant Auth0Provider
  participant FeatureDemo
  participant ResultView
  App->>Auth0Provider: provide domain and clientId
  Auth0Provider->>FeatureDemo: expose Auth0 hooks
  FeatureDemo->>Auth0Provider: execute Auth0 operation
  FeatureDemo->>ResultView: display result or error
Loading
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/rebuild-example-app

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Comment thread example/src/App.web.tsx
const MY_ACCOUNT_AUDIENCE = `https://${config.domain}/me/`;
const MY_ACCOUNT_SCOPE =
'read:me:authentication_methods delete:me:authentication_methods update:me:authentication_methods read:me:factors create:me:authentication_methods';
'read:me:authentication_methods delete:me:authentication_methods ' +

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

didnt understand rationale behind this change

@subhankarmaiti
subhankarmaiti marked this pull request as ready for review September 11, 2026 10:42
@subhankarmaiti
subhankarmaiti requested a review from a team as a code owner September 11, 2026 10:42
@subhankarmaiti
subhankarmaiti merged commit f22f156 into v6-development Sep 11, 2026
5 of 6 checks passed
@subhankarmaiti
subhankarmaiti deleted the chore/rebuild-example-app branch September 11, 2026 10:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants