Skip to content

Commit 7080588

Browse files
committed
feat: add create component into respective framework mdx
1 parent 8107ceb commit 7080588

File tree

6 files changed

+75
-0
lines changed

6 files changed

+75
-0
lines changed

main/docs/quickstart/spa/angular/index.mdx

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ title: Add Login to Your Angular Application
77

88

99
import {AuthCodeGroup} from "/snippets/AuthCodeGroup.jsx";
10+
import {AuthCodeBlock} from "/snippets/AuthCodeBlock.jsx";
11+
import {CreateInteractiveApp} from "/snippets/recipe.jsx";
12+
1013

1114
<Accordion title="AI Prompt" defaultOpen icon="microchip-ai" iconType="sharp-solid">
1215
**Using AI to integrate Auth0?** Add this prompt to Cursor, Windsurf, Copilot, Claude Code or your favourite AI-powered IDE to speed up development.
@@ -751,6 +754,14 @@ SECURITY BEST PRACTICES FOR ANGULAR
751754

752755
This quickstart demonstrates how to add Auth0 authentication to an Angular application. You'll build a secure single-page app with login and logout functionality using Angular's dependency injection system and the Auth0 Angular SDK.
753756

757+
export const localEnvSnippet = `export const environment = {
758+
production: false,
759+
auth0: {
760+
domain: {yourDomain},
761+
clientId: {yourClientId}
762+
}
763+
};`;
764+
754765
<Steps>
755766
<Step title="Create a new project" stepNumber={1}>
756767
Create a new Angular project for this Quickstart
@@ -776,6 +787,12 @@ This quickstart demonstrates how to add Auth0 authentication to an Angular appli
776787
You can choose to do this automatically by running a CLI command or do it manually via the Dashboard:
777788

778789
<Tabs>
790+
<Tab title="Quick Setup (recommended)">
791+
Create an Auth0 App and copy the pre-filled `.env` file with the right configuration values.
792+
<CreateInteractiveApp type="Angular" appType="spa" allowedCallbackUrls={["http://localhost:4200"]} allowedLogoutUrls={["http://localhost:4200"]} allowedOriginUrls={["http://localhost:4200"]}/>
793+
<AuthCodeBlock children={localEnvSnippet} language="typescript" filename="src/environments/environment.ts" />
794+
</Tab>
795+
779796
<Tab title="CLI">
780797
Run the following shell command on your project's root directory to create an Auth0 app and generate an environment file:
781798

main/docs/quickstart/spa/react/index.mdx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ title: Add Login to Your React Application
77

88

99
import {AuthCodeGroup} from "/snippets/AuthCodeGroup.jsx";
10+
import {AuthCodeBlock} from "/snippets/AuthCodeBlock.jsx";
11+
import {CreateInteractiveApp} from "/snippets/recipe.jsx";
1012

1113
<Accordion title="AI Prompt" defaultOpen icon="microchip-ai" iconType="sharp-solid">
1214
**Using AI to integrate Auth0?** Add this prompt to Cursor, Windsurf, Copilot, Claude Code or your favourite AI-powered IDE to speed up development.
@@ -674,6 +676,9 @@ import {AuthCodeGroup} from "/snippets/AuthCodeGroup.jsx";
674676

675677
This quickstart demonstrates how to add Auth0 authentication to a React application. You'll build a secure single-page app with login, logout, and user profile features using the Auth0 React SDK.
676678

679+
export const localEnvSnippet = `VITE_AUTH0_DOMAIN={yourDomain}
680+
VITE_AUTH0_CLIENT_ID={yourClientId}`;
681+
677682
<Steps>
678683
<Step title="Create a new project" stepNumber={1}>
679684
Create a new React project for this Quickstart
@@ -699,6 +704,12 @@ This quickstart demonstrates how to add Auth0 authentication to a React applicat
699704
You can choose to do this automatically by running a CLI command or do it manually via the Dashboard:
700705

701706
<Tabs>
707+
<Tab title="Quick Setup (recommended)">
708+
Create an Auth0 App and copy the pre-filled `.env` file with the right configuration values.
709+
<CreateInteractiveApp type="React" appType="spa" allowedCallbackUrls={["http://localhost:5173"]} allowedLogoutUrls={["http://localhost:5173"]} allowedOriginUrls={["http://localhost:5173"]}/>
710+
<AuthCodeBlock children={localEnvSnippet} language="shellscript" filename=".env" />
711+
</Tab>
712+
702713
<Tab title="CLI">
703714
Run the following shell command on your project's root directory to create an Auth0 app and generate a `.env` file:
704715

main/docs/quickstart/spa/svelte/index.mdx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ title: Add Login to Your Svelte Application
77

88

99
import {AuthCodeGroup} from "/snippets/AuthCodeGroup.jsx";
10+
import {AuthCodeBlock} from "/snippets/AuthCodeBlock.jsx";
11+
import {CreateInteractiveApp} from "/snippets/recipe.jsx";
1012

1113
<Callout icon="pencil" color="#FFC107" iconType="solid">
1214
This Quickstart is currently in **Beta**. We'd love to hear your feedback!
@@ -99,6 +101,9 @@ import {AuthCodeGroup} from "/snippets/AuthCodeGroup.jsx";
99101

100102
This quickstart demonstrates how to add Auth0 authentication to a Svelte application. You'll build a secure single-page app with login, logout, and user profile features using the Auth0 SPA JS SDK.
101103

104+
export const localEnvSnippet = `VITE_AUTH0_DOMAIN={yourDomain}
105+
VITE_AUTH0_CLIENT_ID={yourClientId}`;
106+
102107
<Steps>
103108
<Step title="Create a new project" stepNumber={1}>
104109
Create a new Svelte project for this Quickstart
@@ -126,6 +131,12 @@ This quickstart demonstrates how to add Auth0 authentication to a Svelte applica
126131
You can choose to do this automatically by running a CLI command or do it manually via the Dashboard:
127132

128133
<Tabs>
134+
<Tab title="Quick Setup (recommended)">
135+
Create an Auth0 App and copy the pre-filled `.env` file with the right configuration values.
136+
<CreateInteractiveApp type="Svelte" appType="spa" allowedCallbackUrls={["http://localhost:5173"]} allowedLogoutUrls={["http://localhost:5173"]} allowedOriginUrls={["http://localhost:5173"]}/>
137+
<AuthCodeBlock children={localEnvSnippet} language="shellscript" filename=".env" />
138+
</Tab>
139+
129140
<Tab title="CLI">
130141
Run the following shell command on your project's root directory to create an Auth0 app and generate a `.env` file:
131142

main/docs/quickstart/spa/vanillajs/index.mdx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ title: Add Login to Your JavaScript Application
66
---
77

88
import {AuthCodeGroup} from "/snippets/AuthCodeGroup.jsx";
9+
import {AuthCodeBlock} from "/snippets/AuthCodeBlock.jsx";
10+
import {CreateInteractiveApp} from "/snippets/recipe.jsx";
911

1012
<Accordion title="AI Prompt" defaultOpen icon="microchip-ai" iconType="sharp-solid">
1113
**Using AI to integrate Auth0?** Add this prompt to Cursor, Windsurf, Copilot, Claude Code or your favourite AI-powered IDE to speed up development.
@@ -819,6 +821,9 @@ If you're using Auth0 Organizations:
819821

820822
This quickstart shows how to add Auth0 authentication to a vanilla JavaScript application. You'll create a modern single-page app with secure login functionality using plain JavaScript and the Auth0 SPA SDK.
821823

824+
export const localEnvSnippet = `VITE_AUTH0_DOMAIN={yourDomain}
825+
VITE_AUTH0_CLIENT_ID={yourClientId}`;
826+
822827
<Steps>
823828
<Step title="Create a new project" stepNumber={1}>
824829
Create a new JavaScript project for this Quickstart
@@ -850,6 +855,12 @@ This quickstart shows how to add Auth0 authentication to a vanilla JavaScript ap
850855
You can choose to do this automatically by running a CLI command or do it manually via the Dashboard:
851856

852857
<Tabs>
858+
<Tab title="Quick Setup (recommended)">
859+
Create an Auth0 App and copy the pre-filled `.env` file with the right configuration values.
860+
<CreateInteractiveApp type="Vanilla JS" appType="spa" allowedCallbackUrls={["http://localhost:5173"]} allowedLogoutUrls={["http://localhost:5173"]} allowedOriginUrls={["http://localhost:5173"]}/>
861+
<AuthCodeBlock children={localEnvSnippet} language="shellscript" filename=".env.local" />
862+
</Tab>
863+
853864
<Tab title="CLI">
854865
Run the following shell command on your project's root directory to create an Auth0 app and generate a `.env.local` file:
855866

main/docs/quickstart/spa/vuejs/index.mdx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ title: Add Login to Your Vue Application
77

88

99
import {AuthCodeGroup} from "/snippets/AuthCodeGroup.jsx";
10+
import {AuthCodeBlock} from "/snippets/AuthCodeBlock.jsx";
11+
import {CreateInteractiveApp} from "/snippets/recipe.jsx";
1012

1113
<Accordion title="AI Prompt" defaultOpen icon="microchip-ai" iconType="sharp-solid">
1214
**Using AI to integrate Auth0?** Add this prompt to Cursor, Windsurf, Copilot, Claude Code or your favourite AI-powered IDE to speed up development.
@@ -710,6 +712,9 @@ Solution: Vue 3 with Vite uses import.meta.env.VITE_* for environment variables,
710712

711713
This quickstart demonstrates how to integrate Auth0 authentication into a Vue.js 3 application. You'll build a responsive single-page app with secure user authentication using Vue's composition API and the Auth0 Vue SDK.
712714

715+
export const localEnvSnippet = `VITE_AUTH0_DOMAIN={yourDomain}
716+
VITE_AUTH0_CLIENT_ID={yourClientId}`;
717+
713718
<Steps>
714719
<Step title="Create a new project" stepNumber={1}>
715720
Create a new Vue 3 project for this Quickstart
@@ -735,6 +740,12 @@ This quickstart demonstrates how to integrate Auth0 authentication into a Vue.js
735740
You can choose to do this automatically by running a CLI command or do it manually via the Dashboard:
736741

737742
<Tabs>
743+
<Tab title="Quick Setup (recommended)">
744+
Create an Auth0 App and copy the pre-filled `.env` file with the right configuration values.
745+
<CreateInteractiveApp type="Vue" appType="spa" allowedCallbackUrls={["http://localhost:5173"]} allowedLogoutUrls={["http://localhost:5173"]} allowedOriginUrls={["http://localhost:5173"]}/>
746+
<AuthCodeBlock children={localEnvSnippet} language="shellscript" filename=".env" />
747+
</Tab>
748+
738749
<Tab title="CLI">
739750
Run the following shell command on your project's root directory to create an Auth0 app and generate a `.env` file:
740751

main/docs/quickstart/webapp/nextjs/index.mdx

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ title: Add Login to Your Next.js Application
77

88

99
import {AuthCodeGroup} from "/snippets/AuthCodeGroup.jsx";
10+
import {AuthCodeBlock} from "/snippets/AuthCodeBlock.jsx";
11+
import {CreateInteractiveApp} from "/snippets/recipe.jsx";
1012

1113
<Accordion title="AI Prompt" defaultOpen icon="microchip-ai" iconType="sharp-solid">
1214
**Using AI to integrate Auth0?** Add this prompt to Cursor, Windsurf, Copilot, Claude Code or your favourite AI-powered IDE to speed up development.
@@ -674,6 +676,12 @@ import {AuthCodeGroup} from "/snippets/AuthCodeGroup.jsx";
674676

675677
This quickstart demonstrates how to add Auth0 authentication to a Next.js application. You'll build a full-stack web application with server-side rendering, secure login functionality, and protected routes using the Auth0 Next.js SDK.
676678

679+
export const localEnvSnippet = `AUTH0_DOMAIN={yourDomain}
680+
AUTH0_CLIENT_ID={yourClientId}
681+
AUTH0_CLIENT_SECRET=YOUR_AUTH0_APP_CLIENT_SECRET
682+
AUTH0_SECRET=YOUR_LONG_RANDOM_SECRET_HERE
683+
APP_BASE_URL=http://localhost:3000`;
684+
677685
<Steps>
678686
<Step title="Create a new project" stepNumber={1}>
679687
Create a new Next.js project for this Quickstart
@@ -718,6 +726,12 @@ This quickstart demonstrates how to add Auth0 authentication to a Next.js applic
718726
You can choose to do this automatically by running a CLI command or do it manually via the Dashboard:
719727

720728
<Tabs>
729+
<Tab title="Quick Setup (recommended)">
730+
Create an Auth0 App and copy the pre-filled `.env` file with the right configuration values.
731+
<CreateInteractiveApp type="Next.js" appType="regular_web" allowedCallbackUrls={["http://localhost:3000/auth/callback"]} allowedLogoutUrls={["http://localhost:3000"]} allowedOriginUrls={["http://localhost:3000"]}/>
732+
<AuthCodeBlock children={localEnvSnippet} language="shellscript" filename=".env.local" />
733+
</Tab>
734+
721735
<Tab title="CLI">
722736
Run the following shell command on your project's root directory to create an Auth0 app and generate a `.env.local` file:
723737

0 commit comments

Comments
 (0)