Skip to content

Commit 2215ac8

Browse files
committed
feat: update prop name and add random string generation to AUTH0_SECRET
1 parent 0ad2215 commit 2215ac8

File tree

7 files changed

+15
-9
lines changed

7 files changed

+15
-9
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -789,7 +789,7 @@ export const localEnvSnippet = `export const environment = {
789789
<Tabs>
790790
<Tab title="Quick Setup (recommended)">
791791
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"]}/>
792+
<CreateInteractiveApp placeholderText="Angular" appType="spa" allowedCallbackUrls={["http://localhost:4200"]} allowedLogoutUrls={["http://localhost:4200"]} allowedOriginUrls={["http://localhost:4200"]}/>
793793
<AuthCodeBlock children={localEnvSnippet} language="typescript" filename="src/environments/environment.ts" />
794794
</Tab>
795795

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -706,7 +706,7 @@ VITE_AUTH0_CLIENT_ID={yourClientId}`;
706706
<Tabs>
707707
<Tab title="Quick Setup (recommended)">
708708
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"]}/>
709+
<CreateInteractiveApp placeholderText="React" appType="spa" allowedCallbackUrls={["http://localhost:5173"]} allowedLogoutUrls={["http://localhost:5173"]} allowedOriginUrls={["http://localhost:5173"]}/>
710710
<AuthCodeBlock children={localEnvSnippet} language="shellscript" filename=".env" />
711711
</Tab>
712712

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ VITE_AUTH0_CLIENT_ID={yourClientId}`;
133133
<Tabs>
134134
<Tab title="Quick Setup (recommended)">
135135
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"]}/>
136+
<CreateInteractiveApp placeholderText="Svelte" appType="spa" allowedCallbackUrls={["http://localhost:5173"]} allowedLogoutUrls={["http://localhost:5173"]} allowedOriginUrls={["http://localhost:5173"]}/>
137137
<AuthCodeBlock children={localEnvSnippet} language="shellscript" filename=".env" />
138138
</Tab>
139139

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -857,7 +857,7 @@ VITE_AUTH0_CLIENT_ID={yourClientId}`;
857857
<Tabs>
858858
<Tab title="Quick Setup (recommended)">
859859
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"]}/>
860+
<CreateInteractiveApp placeholderText="Vanilla JS" appType="spa" allowedCallbackUrls={["http://localhost:5173"]} allowedLogoutUrls={["http://localhost:5173"]} allowedOriginUrls={["http://localhost:5173"]}/>
861861
<AuthCodeBlock children={localEnvSnippet} language="shellscript" filename=".env.local" />
862862
</Tab>
863863

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -742,7 +742,7 @@ VITE_AUTH0_CLIENT_ID={yourClientId}`;
742742
<Tabs>
743743
<Tab title="Quick Setup (recommended)">
744744
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"]}/>
745+
<CreateInteractiveApp placeholderText="Vue" appType="spa" allowedCallbackUrls={["http://localhost:5173"]} allowedLogoutUrls={["http://localhost:5173"]} allowedOriginUrls={["http://localhost:5173"]}/>
746746
<AuthCodeBlock children={localEnvSnippet} language="shellscript" filename=".env" />
747747
</Tab>
748748

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

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -676,10 +676,16 @@ import {CreateInteractiveApp} from "/snippets/recipe.jsx";
676676

677677
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.
678678

679+
680+
export function generateRandomString(length) {
681+
const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
682+
return Array.from({length}, () => chars[Math.floor(Math.random() * chars.length)]).join('');
683+
}
684+
679685
export const localEnvSnippet = `AUTH0_DOMAIN={yourDomain}
680686
AUTH0_CLIENT_ID={yourClientId}
681687
AUTH0_CLIENT_SECRET={yourClientSecret}
682-
AUTH0_SECRET=YOUR_LONG_RANDOM_SECRET_HERE
688+
AUTH0_SECRET=${generateRandomString(32)}
683689
APP_BASE_URL=http://localhost:3000`;
684690

685691
<Steps>
@@ -728,7 +734,7 @@ APP_BASE_URL=http://localhost:3000`;
728734
<Tabs>
729735
<Tab title="Quick Setup (recommended)">
730736
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"]}/>
737+
<CreateInteractiveApp placeholderText="Next.js" appType="regular_web" allowedCallbackUrls={["http://localhost:3000/auth/callback"]} allowedLogoutUrls={["http://localhost:3000"]} allowedOriginUrls={["http://localhost:3000"]}/>
732738
<AuthCodeBlock children={localEnvSnippet} language="shellscript" filename=".env.local" />
733739
</Tab>
734740

main/snippets/recipe.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -670,7 +670,7 @@ export const SignUpForm = () => {
670670
};
671671

672672
export const CreateInteractiveApp = ({
673-
type = 'Auth0',
673+
placeholderText = 'Auth0',
674674
appType = 'regular_web', // 'regular_web' | 'spa' | 'native' | 'non_interactive',
675675
allowedCallbackUrls = ['localhost:3000'],
676676
allowedLogoutUrls = ['localhost:3000'],
@@ -800,7 +800,7 @@ export const CreateInteractiveApp = ({
800800
text-gray-900 dark:text-gray-200
801801
focus:outline-none dark:focus:outline-none
802802
"
803-
placeholder={`My ${type} App`}
803+
placeholder={`My ${placeholderText} App`}
804804
value={name}
805805
onChange={(e) => setName(e.target.value)}
806806
/>

0 commit comments

Comments
 (0)