{"id":14989848,"url":"https://github.com/oktadev/schematics","last_synced_at":"2025-04-09T15:08:14.276Z","repository":{"id":37103801,"uuid":"162402696","full_name":"oktadev/schematics","owner":"oktadev","description":"Schematics for adding Okta and Auth0 Auth to your projects","archived":false,"fork":false,"pushed_at":"2024-06-24T23:13:51.000Z","size":2682,"stargazers_count":76,"open_issues_count":17,"forks_count":29,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-04-09T15:08:04.071Z","etag":null,"topics":["angular","auth0","authentication","expressjs","ionic","javascript","oauth2","oidc","okta","quickstart","react","react-native","schematics","typescript","vue"],"latest_commit_sha":null,"homepage":"https://auth0.com/blog/quick-javascript-authentication/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/oktadev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-12-19T07:57:31.000Z","updated_at":"2025-03-20T20:54:38.000Z","dependencies_parsed_at":"2024-11-18T09:16:31.201Z","dependency_job_id":null,"html_url":"https://github.com/oktadev/schematics","commit_stats":{"total_commits":1041,"total_committers":5,"mean_commits":208.2,"dds":0.542747358309318,"last_synced_commit":"4bd2dc8545c6183d2fb7ea485e8aa0f7d3185409"},"previous_names":[],"tags_count":59,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oktadev%2Fschematics","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oktadev%2Fschematics/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oktadev%2Fschematics/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oktadev%2Fschematics/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oktadev","download_url":"https://codeload.github.com/oktadev/schematics/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248055284,"owners_count":21040157,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["angular","auth0","authentication","expressjs","ionic","javascript","oauth2","oidc","okta","quickstart","react","react-native","schematics","typescript","vue"],"created_at":"2024-09-24T14:19:01.190Z","updated_at":"2025-04-09T15:08:14.253Z","avatar_url":"https://github.com/oktadev.png","language":"TypeScript","readme":"# OktaDev Schematics\n[![NPM version][npm-image]][npm-url] [![Build Status][github-actions-image]][github-actions-url] \u003c!--[![Dependency Status][daviddm-image]][daviddm-url]--\u003e \u003cobject id=\"badge\" data=\"https://snyk-widget.herokuapp.com/badge/npm/%40oktadev%2Fschematics/6.1.0/badge.svg\" type=\"image/svg+xml\"\u003e\u003c/object\u003e [![Known Vulnerabilities][snyk-image]][snyk-url]\n\u003e Fast and easy installation of Okta and Auth0's OIDC SDKs\n\nThis project is a Schematics implementation that allows you to easily integrate Okta and Auth0 into your Angular, React, Vue, Ionic, React Native, and Express projects.\n\nThis library currently supports:\n\n- [OAuth 2.0 Authorization Code Flow](https://tools.ietf.org/html/rfc6749#section-1.3.1)\n- [Proof Key for Code Exchange (PKCE)](https://tools.ietf.org/html/rfc7636)\n\n**Prerequisites:** [Node.js](https://nodejs.org/). \n\nUse the links below to see how to create an app and integrate authentication using OktaDev Schematics.\n\n* [Angular](#angular) \n* [React](#react)\n* [Vue](#vue)\n* [Ionic](#ionic)\n* [React Native](#react-native)\n* [Express](#express)\n\nTo learn more about this project, see the following topics:\n\n* [Testing](#testing)\n* [Contributing](#contributing)\n* [Tutorials](#tutorials)\n* [Links](#links)\n* [Help](#help)\n* [License](#license)\n\n## Angular \n\nFirst, create an empty project with Angular CLI. You **must** add Angular routing for this schematic to work.\n\n```\nnpm i -g @angular/cli\nng new secure-angular --routing\ncd secure-angular\n```\n\nThen, integrate your Angular app with [Okta](#okta-for-angular) or [Auth0](#auth0-for-angular).\n\n### Okta for Angular\n\n1. Install the [Okta CLI](https://cli.okta.com).\n2. Run `okta register` to create an account, followed by `okta apps create`.\n3. Choose **Single Page App** and use `http://localhost:4200/callback` for the Redirect URI.\n\nIn your `secure-angular` project, add `@oktadev/schematics`:\n\n```\nng add @oktadev/schematics\n```\n\nUse the values that the Okta CLI provides for the issuer and client ID when prompted.\n\nRun `npm start`, open `http://localhost:4200` in your browser, and sign in. 🥳\n\nSee the [Okta Angular SDK](https://github.com/okta/okta-angular) for more information.\n\nYou can also use the Okta Admin Console:\n\n* Log in to your Okta instance (or [create an account](https://developer.okta.com/signup) if you don't have one). Go to **Applications** \u003e **Create App Integration** \u003e **OIDC**.\n* Choose **Single-Page Application** as the application type and click **Next**.\n* Add `http://localhost:4200/callback` as a Sign-in redirect URI and `http://localhost:4200` as a Sign-out redirect URI.\n* Specify `http://localhost:4200` as a Trusted Origin and click **Save**.\n\n### Auth0 for Angular\n\n1. Install the [Auth0 CLI](https://github.com/auth0/auth0-cli).\n2. Run `auth0 login` to register your account, followed by `auth0 apps create`.\n3. Specify a name and description of your choosing.\n4. Select **Single Page Web Application** and use `http://localhost:4200/home` for the Callback URLs.\n5. Use `http://localhost:4200` for the rest of the URLs.\n\nIn your `secure-angular` project, add `@oktadev/schematics` with the `--auth0` flag:\n\n```\nng add @oktadev/schematics --auth0\n```\n\nUse the values that the Auth0 CLI provides for the issuer and client ID when prompted. \n\nRun `npm start`, open `http://localhost:4200` in your browser, and sign in. 🥳\n\nSee the [Auth0 Angular SDK](https://github.com/auth0/auth0-angular) for more information.\n\nYou can also use the Auth0 Console:\n\n* [Log in](https://auth0.com/auth/login) to Auth0 or [create an account](https://auth0.com/signup) if you don't have one. Go to **Applications** \u003e **Create Application**.\n* Choose **Single Page Web Applications** as the application type and click **Create**.\n* Select the **Settings** tab.\n* Add `http://localhost:4200/home` as an Allowed Callback URL and `http://localhost:4200` as a Logout URL.\n* Specify `http://localhost:4200` as an Allowed Origin and click **Save Changes** at the bottom.\n\n## React\n\nCreate a new project with Create React App.\n\n```\nnpx create-react-app secure-react\ncd secure-react\n```\n\nIf you'd like to use TypeScript, add the `--template typescript` flag.\n\n```\nnpx create-react-app secure-react --template typescript\ncd secure-react\n```\n\nThen, integrate your React app with [Okta](#okta-for-react) or [Auth0](#auth0-for-react).\n\n### Okta for React\n\n1. Install the [Okta CLI](https://cli.okta.com).\n2. Run `okta register` to create an account, followed by `okta apps create`.\n3. Choose **Single Page App** and use `http://localhost:3000/callback` for the Redirect URI.\n\nInstall the Schematics CLI globally.\n\n```\nnpm install -g @angular-devkit/schematics-cli\n```\n\nThen install and run the `add-auth` schematic in your `secure-react` project.\n\n```\nnpm i -D @oktadev/schematics\nschematics @oktadev/schematics:add-auth\n```\n\nUse the values that the Okta CLI provides for the issuer and client ID when prompted.\n\nRun `npm start`, open `http://localhost:3000` in your browser, and sign in. 🎉\n\nSee the [Okta React SDK](https://github.com/okta/okta-react) for more information.\n\nYou can also use the Okta Admin Console:\n\n* Log in to your Okta instance (or [create an account](https://developer.okta.com/signup) if you don't have one). Go to **Applications** \u003e **Create App Integration** \u003e **OIDC**.\n* Choose **Single-Page Application** as the application type and click **Next**.\n* Add `http://localhost:3000/callback` as a Sign-in redirect URI and `http://localhost:3000` as a Sign-out redirect URI.\n* Add `http://localhost:3000` as a Trusted Origin and click **Save**.\n\n### Auth0 for React\n\n1. Install the [Auth0 CLI](https://github.com/auth0/auth0-cli).\n2. Run `auth0 login` to register your account, followed by `auth0 apps create`.\n3. Specify a name and description of your choosing.\n4. Select **Single Page Web Application** and use `http://localhost:3000` for the Callback URL.\n5. Use `http://localhost:3000` for the rest of the URLs.\n\nInstall the Schematics CLI globally.\n\n```\nnpm install -g @angular-devkit/schematics-cli\n```\n\nThen install and run the `add-auth` schematic in your `secure-react` project with the `--auth0` flag:\n\n```\nnpm i -D @oktadev/schematics\nschematics @oktadev/schematics:add-auth --auth0\n```\n\nUse the values that the Auth0 CLI provides for the issuer and client ID when prompted.\n\nRun `npm start`, open `http://localhost:3000` in your browser, and sign in. 🎉\n\nSee the [Auth0 React SDK](https://github.com/auth0/auth0-react) for more information.\n\nYou can also use the Auth0 Console:\n\n* [Log in](https://auth0.com/auth/login) to Auth0 or [create an account](https://auth0.com/signup) if you don't have one. Go to **Applications** \u003e **Create Application**.\n* Choose **Single Page Web Applications** as the application type and click **Create**.\n* Select the **Settings** tab.\n* Add `http://localhost:3000` as an Allowed Callback URL and `http://localhost:3000` as a Logout URL.\n* Specify `http://localhost:3000` as an Allowed Origin and click **Save Changes** at the bottom.\n\n## Vue\n\nCreate a new project with Vue CLI. You **must** add routing for this schematic to work. If you specify TypeScript, a `src/router/index.ts` will be used.\n\n```\nnpm i -g @vue/cli\nvue create secure-vue\ncd secure-vue\n```\n\nThen, integrate your Vue app with [Okta](#okta-for-vue) or [Auth0](#auth0-for-vue).\n\n### Okta for Vue\n\n1. Install the [Okta CLI](https://cli.okta.com).\n2. Run `okta register` to create an account, followed by `okta apps create`.\n3. Choose **Single Page App** and use `http://localhost:8080/callback` for the Redirect URI.\n\nInstall the Schematics CLI globally.\n\n```\nnpm install -g @angular-devkit/schematics-cli\n```\n\nThen install and run the `add-auth` schematic in your `secure-vue` project.\n\n```\nnpm i -D @oktadev/schematics\nschematics @oktadev/schematics:add-auth\n```\n\nUse the values that the Okta CLI provides for the issuer and client ID when prompted.\n\nRun `npm run serve`, open `http://localhost:8080` in your browser, and sign in. 💥\n\nSee the [Okta Vue SDK](https://github.com/okta/okta-vue) for more information.\n\nYou can also use the Okta Admin Console:\n\n* Log in to your Okta instance (or [create an account](https://developer.okta.com/signup) if you don't have one). Go to **Applications** \u003e **Create App Integration** \u003e **OIDC**.\n* Choose **Single-Page Application** as the application type and click **Next**.\n* Add `http://localhost:8080/callback` as a Sign-in redirect URI and `http://localhost:8080` as a Sign-out redirect URI.\n* Add `http://localhost:8080` as a Trusted Origin and click **Save**.\n\n### Auth0 for Vue\n\n1. Install the [Auth0 CLI](https://github.com/auth0/auth0-cli).\n2. Run `auth0 login` to register your account, followed by `auth0 apps create`.\n3. Specify a name and description of your choosing.\n4. Select **Single Page Web Application** and use `http://localhost:8080` for the Callback URL.\n5. Use `http://localhost:8080` for the rest of the URLs.\n\nInstall the Schematics CLI globally.\n\n```\nnpm install -g @angular-devkit/schematics-cli\n```\n\nThen install and run the `add-auth` schematic in your `secure-react` project with the `--auth0` flag:\n\n```\nnpm i -D @oktadev/schematics\nschematics @oktadev/schematics:add-auth --auth0\n```\n\nUse the values that the Auth0 CLI provides for the issuer and client ID when prompted.\n\nRun `npm run serve`, open `http://localhost:8080` in your browser, and sign in. 💥\n\nSee the [Auth0 Vue SDK](https://github.com/auth0/auth0-vue) for more information.\n\nYou can also use the Auth0 Console:\n\n* [Log in](https://auth0.com/auth/login) to Auth0 or [create an account](https://auth0.com/signup) if you don't have one. Go to **Applications** \u003e **Create Application**.\n* Choose **Single Page Web Applications** as the application type and click **Create**.\n* Select the **Settings** tab.\n* Add `http://localhost:8080` as an Allowed Callback URL and `http://localhost:8080` as a Logout URL.\n* Specify `http://localhost:8080` as an Allowed Origin and click **Save Changes** at the bottom.\n\n## Ionic\n\nCreate a new Ionic + Angular project with Ionic CLI. You **must** use the `tabs` layout for everything to work correctly. \n\n```\nnpm install -g @ionic/cli\nionic start secure-ionic tabs --type=angular --no-interactive \ncd secure-ionic\n```\n\nThen, integrate your Ionic app with [Okta](#okta-for-ionic) or [Auth0](#auth0-for-ionic).\n\n### Okta for Ionic\n\n1. Install the [Okta CLI](https://cli.okta.com).\n2. Run `okta register` to create an account, followed by `okta apps create`.\n3. Choose **Native** and use `[com.okta.dev-133337:/callback,http://localhost:8100/callback,https://localhost]` for the Login redirect URIs (where `dev-133337.okta.com` is your Okta domain).\n4. Use `[com.okta.dev-133337:/logout,http://localhost:8100/logout]` for the Logout redirect URIs.\n\nIn your `secure-ionic` project, add `@oktadev/schematics`:\n\n```\nng add @oktadev/schematics\n```\n\nUse the values that the Okta CLI provides for the issuer and client ID when prompted.\n\nStart your app and authenticate with Okta. 🎊\n\n```\nionic serve\n```\n\nYou can also use the Okta Admin Console:\n\nLog in to your Okta instance (or [sign up](https://developer.okta.com/signup/) if you don't have an account).\n\nFrom the **Applications** page, choose **Create App Integration** \u003e **OIDC**. Select **Native Application**. \n\nGive your app a memorable name, and configure it as follows:\n\n* Sign-in redirect URIs:\n  * `http://localhost:8100/callback`\n  * `com.okta.dev-133337:/callback` (where `dev-133337.okta.com` is your Okta domain)\n  * `https://localhost`\n* Sign-out redirect URIs:\n  * `http://localhost:8100/logout`\n  * `com.okta.dev-133337:/logout`\n* Trusted Origins:\n  * `http://localhost:8100`\n* Click **Save**\n\n### Auth0 for Ionic\n\n1. Install the [Auth0 CLI](https://github.com/auth0/auth0-cli).\n2. Run `auth0 login` to register your account, followed by `auth0 apps create`.\n3. Specify a name and description of your choosing.\n4. Select **Native** and use `dev.localhost.ionic:/callback,http://localhost:8100/callback` for the Callback URLs.\n5. Use `dev.localhost.ionic:/logout,http://localhost:8100/logout` for the Logout URLs.\n6. Run `auth0 apps open` and add `http://localhost:8100,http://localhost` to **Allowed Origins (CORS)**. Scroll down and **Save Changes**.\n\nIn your `secure-ionic` project, add `@oktadev/schematics` with the `--auth0` flag:\n\n```\nng add @oktadev/schematics --auth0\n```\n\nUse the values that the Auth0 CLI provides for the issuer and client ID when prompted.\n\nStart your app and authenticate with Auth0. 🎊\n\n```\nionic serve\n```\n\nYou can also use the Auth0 Console:\n\n* [Log in](https://auth0.com/auth/login) to Auth0 or [create an account](https://auth0.com/signup) if you don't have one. Go to **Applications** \u003e **Create Application**.\n* Choose **Native** as the application type and click **Create**.\n* Select the **Settings** tab.\n* Add `dev.localhost.ionic:/callback,http://localhost:8100/callback` for Allowed Callback URLs and `dev.localhost.ionic:/logout,http://localhost:8100/logout` for the Logout URLs.\n* Add `http://localhost:8100,https://localhost` to **Allowed Origins (CORS)**. Scroll down and **Save Changes**.\n\n### iOS\n\nBuild and add Capacitor for iOS with the following commands:\n\n```\nionic build\nnpm i @capacitor/ios\nnpx cap add ios\n```\n\nAdd your custom scheme to `ios/App/App/Info.plist`:\n\n```xml\n\u003ckey\u003eCFBundleURLTypes\u003c/key\u003e\n\u003carray\u003e\n  \u003cdict\u003e\n    \u003ckey\u003eCFBundleURLName\u003c/key\u003e\n    \u003cstring\u003ecom.getcapacitor.capacitor\u003c/string\u003e\n    \u003ckey\u003eCFBundleURLSchemes\u003c/key\u003e\n    \u003carray\u003e\n      \u003cstring\u003edev.localhost.ionic\u003c/string\u003e\n      \u003cstring\u003ecom.okta.dev-133337\u003c/string\u003e\n    \u003c/array\u003e\n  \u003c/dict\u003e\n\u003c/array\u003e\n```\n\nThen, run your project using the Capacitor CLI:\n\n```\nnpx cap run ios\n```\n\nYou can also open your project in Xcode and configure code signing.\n\n```\nnpx cap open ios\n```\n\nThen run your app from Xcode.\n\n### Android\n\nBuild and add Capacitor for Android with the following commands:\n\n```\nionic build\nnpm i @capacitor/android\nnpx cap add android\n```\n\nAdd your reverse domain name as the `android:scheme` in `android/app/src/main/AndroidManifest.xml` by adding another `\u003cintent-filter\u003e` above the existing one in the `\u003cactivity\u003e` element.\n\n```xml\n\u003cintent-filter\u003e\n    \u003caction android:name=\"android.intent.action.VIEW\" /\u003e\n    \u003ccategory android:name=\"android.intent.category.DEFAULT\"/\u003e\n    \u003ccategory android:name=\"android.intent.category.BROWSABLE\" /\u003e\n    \u003cdata android:scheme=\"com.okta.dev-133337\" /\u003e \u003c!-- use dev.localhost.ionic for Auth0 --\u003e\n\u003c/intent-filter\u003e\n```\n\nThen, run your project using the Capacitor CLI:\n\n```\nnpx cap run android\n```\n\nYou can also open your project in Android Studio and run your app.\n\n```\nnpx cap open android\n```\n\nSee [Ionic's iOS](https://ionicframework.com/docs/developing/ios) and [Android Development](https://ionicframework.com/docs/developing/android) docs for more information.\n\n## React Native\n\nCreate a new React Native project with the React Native CLI. \n\n```\nnpx react-native init SecureApp\n```\n\nThen, integrate your React Native app with [Okta](#okta-for-react-native) or [Auth0](#auth0-for-react-native).\n\n### Okta for React Native\n\n1. Install the [Okta CLI](https://cli.okta.com).\n2. Run `okta register` to create an account, followed by `okta apps create`.\n3. Choose **Native** and accept the default Redirect URI of `com.okta.dev-133337:/callback` (where `dev-133337.okta.com` is your Okta domain).\n4. Use `com.okta.dev-133337:/logout` for the Post Logout Redirect URI.\n\nInstall the Schematics CLI globally.\n\n```\nnpm install -g @angular-devkit/schematics-cli\n```\n\nInstall and run the `add-auth` schematic in your `SecureApp` project.\n\n```\ncd SecureApp\nnpm i -D @oktadev/schematics\nschematics @oktadev/schematics:add-auth --issuer=$issuer --client-id=$clientId\n```\n\nYou can also use the Okta Admin Console:\n\n* Log in to your Okta instance (or [create an account](https://developer.okta.com/signup) if you don't have one). Go to **Applications** \u003e **Create App Integration** \u003e **OIDC**.\n* Choose **Native** as the application type and click **Next**.\n* Add `com.okta.dev-133337:/callback` as a Sign-in redirect URI and `com.okta.dev-133337:/callback` as a Sign-out redirect URI (where `dev-133337.okta.com` is your Okta domain).\n\n### Auth0 for React Native\n\n1. Install the [Auth0 CLI](https://github.com/auth0/auth0-cli).\n2. Run `auth0 login` to register your account, followed by `auth0 apps create`.\n3. Specify a name and description of your choosing.\n4. Select **Native** and use the following for your Callback and Logout URLs:\n\n       org.reactjs.native.example.\u003cyourappname\u003e.auth0://\u003cyour-auth0-domain\u003e/ios/org.reactjs.native.example.\u003cyourappname\u003e/callback,com.\u003cyourappname\u003e.auth0://\u003cyour-auth0-domain\u003e/android/com.\u003cyourappname\u003e/callback\n\nFor example:\n\n```\norg.reactjs.native.example.secureauth0.auth0://dev-06bzs1cu.us.auth0.com/ios/org.reactjs.native.example.secureauth0/callback, com.secureauth0.auth0://dev-06bzs1cu.us.auth0.com/android/com.secureauth0/callback\n```\n\nInstall the Schematics CLI globally.\n\n```\nnpm install -g @angular-devkit/schematics-cli\n```\n\nInstall and run the `add-auth` schematic in your `SecureApp` project with the `--auth0` flag. \n\n```\ncd SecureApp\nnpm i -D @oktadev/schematics\nschematics @oktadev/schematics:add-auth --issuer=$issuer --client-id=$clientId --auth0\n```\n\nYou can also use the Auth0 Console:\n\n* [Log in](https://auth0.com/auth/login) to Auth0 or [create an account](https://auth0.com/signup) if you don't have one. Go to **Applications** \u003e **Create Application**.\n* Choose **Native** as the application type and click **Create**.\n* Select the **Settings** tab.\n* Add the following for Allowed Callback and Logout URLs:\n\n       org.reactjs.native.example.\u003cyourappname\u003e.auth0://\u003cyour-auth0-domain\u003e/ios/org.reactjs.native.example.\u003cyourappname\u003e/callback,com.\u003cyourappname\u003e.auth0://\u003cyour-auth0-domain\u003e/android/com.\u003cyourappname\u003e/callback\n\nFor example:\n\n```\norg.reactjs.native.example.secureauth0.auth0://dev-06bzs1cu.us.auth0.com/ios/org.reactjs.native.example.secureauth0/callback, com.secureauth0.auth0://dev-06bzs1cu.us.auth0.com/android/com.secureauth0/callback\n```\n\n### iOS\n\nRun `npx pod-install`.\n\nStart your app and authenticate with Okta. 🎉\n\n```\nnpm run ios\n```\n\n**NOTE:** If you have issues with compiling, you may have to disable Flipper in `ios/Podfile`. Then run `npx pod-install` again.\n\n### Android\n\nOne change is made to Android build files. In `android/app/build.gradle`, a `manifestPlaceholders` is added in `android` \u003e `defaultConfig`.\n\nSince this modification is done for you, you can simply start your app and authenticate with Okta. 🎊\n\n```\nnpm run android\n```\n\nFor more information, see the [Okta React Native SDK](https://github.com/okta/okta-react-native#readme) and the [Auth0 React Native SDK](https://github.com/auth0/react-native-auth0#readme).\n\n## Express\n\nCreate a new project with express-generator and pug.\n\n```\nmkdir express-app\ncd express-app\nnpx express-generator --view=pug\n```\nThen, integrate your Express app with [Okta](#okta-for-express) or [Auth0](#auth0-for-express).\n\n### Okta for Express\n\n1. Install the [Okta CLI](https://cli.okta.com).\n2. Run `okta register` to create an account, followed by `okta apps create`.\n3. Choose **Web** \u003e **Other** and use `http://localhost:3000/callback` for the Redirect URI.\n4. Accept the default Post Logout Redirect URI (`http://localhost:3000/`).\n\nInstall the Schematics CLI globally.\n\n```\nnpm install -g @angular-devkit/schematics-cli\n```\n\nThen install and run the `add-auth` schematic in your `express-app` project. \n\nThe Okta CLI will create an `.okta.env` file in the current directory. It will have the values you need. After you use them in the command below, you can delete this file.\n\n```\nnpm i -D @oktadev/schematics\nschematics @oktadev/schematics:add-auth --issuer=$issuer \\\n  --client-id=$clientId --client-secret=$clientSecret\n```\n\n🚨 This process will create an `.env` file will be generated with your credentials. Make sure to add `*.env` to `.gitignore` and don't check it into source control!\n\nStart your app and authenticate with Okta at `http://localhost:3000`. 🎊\n\n```\nnpm start\n```\n\nSee the [Okta OIDC Middleware SDK](https://github.com/okta/okta-oidc-js/tree/master/packages/oidc-middleware#readme) for more information.\n\nYou can also create your app using the Okta Admin Console:\n\n* Log into the Okta Developer Dashboard (or [create an account](https://developer.okta.com/signup) if you don't have one), click **Applications** then **Create App Integration** \u003e **OIDC**.\n* Choose **Web** as the application type and click **Next**.\n* Add a Sign-in redirect URI of `http://localhost:3000/callback`.\n* Add a Sign-out redirect URI of `http://localhost:3000`.\n* Click **Save**.\n\n### Auth0 for Express\n\n1. Install the [Auth0 CLI](https://github.com/auth0/auth0-cli).\n2. Run `auth0 login` to register your account, followed by `auth0 apps create`.\n3. Specify a name and description of your choosing.\n4. Select **Regular Web Application** and use `http://localhost:3000/callback` for the Callback URL.\n5. Use `http://localhost:3000` for the Logout URL.\n\nInstall the Schematics CLI globally.\n\n```\nnpm install -g @angular-devkit/schematics-cli\n```\n\nThen install and run the `add-auth` schematic in your `express-app` project with the `--auth0` flag.\n\nUse the values that the Auth0 CLI provides for the issuer and client ID. You may have to use `auth0 apps open` to get the client secret for your app.\n\n```\nnpm i -D @oktadev/schematics\nschematics @oktadev/schematics:add-auth --issuer=$issuer \\\n  --client-id=$clientId --client-secret=$clientSecret --auth0\n```\n\n🚨 This process will create an `.env` file with your credentials. Make sure to add `*.env` to `.gitignore` and don't check it into source control!\n\nStart your app and authenticate with Auth0 at `http://localhost:3000`. 🎊\n\n```\nnpm start\n```\n\nSee the [Auth0 Express OpenID Connect SDK](https://github.com/auth0/express-openid-connect#readme) for more information.\n\nYou can also use the Auth0 Console:\n\n* [Log in](https://auth0.com/auth/login) to Auth0 or [create an account](https://auth0.com/signup) if you don't have one. Go to **Applications** \u003e **Create Application**.\n* Choose **Regular Web Application** as the application type and click **Create**.\n* Select the **Settings** tab.\n* Add `http://localhost:3000/callback` as an Allowed Callback URL and `http://localhost:3000` as a Logout URL.\n* Click **Save Changes** at the bottom.\n\n## Testing\n\nThis project supports unit tests and integration tests.\n\n`npm test` will run the unit tests, using [Jasmine](https://jasmine.github.io/) as a runner and test framework.\n\n`./test-app.sh angular` will create an Angular project with Angular CLI, install this project, and make sure all the project's tests pass. Other options include `react`, `react-ts`, `vue`, `vue-ts`, `ionic`, `ionic`, `react-native`, and `express`. You can also add `-auth0` to any of these options.\n\n`./test-all.sh` will test all the options for both Okta and Auth0: Angular, React, React with TypeScript, Vue, Vue with TypeScript, Ionic with Capacitor, React Native, and Express.\n\n## Publishing\n\nTo publish, simply do:\n\n```bash\nnpm publish\n```\n\nThat's it!\n\n## Contributing\n\nIf you'd like to modify this library, and contribute your changes, you can start by forking it to your own GitHub repository. Then, clone it to your hard drive.\n\n```\ngit clone git@github.com:\u003cyour username\u003e/schematics.git\ncd schematics\n```\n\nCreate a new branch for your changes:\n\n```\ngit checkout -b my-awesome-branch\n```\n\nMake the changes you want to make and add tests where appropriate. Create a new project with whatever framework you're using, then run the following command inside it to use your modified project.\n\n```\nnpm link /path/to/schematics\n```\n\nYou'll need to run `npm run build` whenever you change anything in the schematics project.\n\n**NOTE:** You can also use `npm pack` in your schematics project, then `npm install /path/to/artifact.tar.gz` in your test project. \n\n## Tutorials\n\nCheck out the following blog posts to see OktaDev Schematics in action.\n\n* [Add OpenID Connect to Angular Apps Quickly](https://auth0.com/blog/add-oidc-to-angular-apps-quickly/)\n* [Use Angular Schematics to Simplify Your Life](https://developer.okta.com/blog/2019/02/13/angular-schematics)\n* [Use Schematics with Vue and Add Authentication in 5 Minutes](https://developer.okta.com/blog/2019/05/21/vue-schematics)\n* [Use Schematics with React and Add OpenID Connect Authentication in 5 Minutes](https://developer.okta.com/blog/2019/03/05/react-schematics)\n* [Tutorial: User Login and Registration in Ionic 4](https://developer.okta.com/blog/2019/06/20/ionic-4-tutorial-user-authentication-and-registration)\n* [Create a React Native App with Login in 10 Minutes](https://developer.okta.com/blog/2019/11/14/react-native-login)\n\n## Links\n\nThis project uses the following open source libraries from Okta:\n\n* [Okta Angular SDK](https://github.com/okta/okta-angular)\n* [Okta React SDK](https://github.com/okta/okta-react)\n* [Okta Vue SDK](https://github.com/okta/okta-vue)\n* [Okta React Native SDK](https://github.com/okta/okta-react-native)\n* [Okta OIDC Middleware](https://github.com/okta/okta-oidc-middleware)\n\nAnd these from Auth0:\n\n* [Auth0 Angular SDK](https://github.com/auth0/auth0-angular)\n* [Auth0 React SDK](https://github.com/auth0/auth0-react)\n* [Auth0 Vue SDK](https://github.com/auth0/auth0-vue)\n* [Auth0 React Native SDK](https://github.com/auth0/react-native-auth0)\n* [Auth0 Express OpenID Connect](https://github.com/auth0/express-openid-connect)\n\nFor Ionic, it uses [Ionic AppAuth](https://github.com/wi3land/ionic-appauth).\n\n## Help\n\nPlease post any questions as issues or ask them on the [Okta Developer Forums][devforum-url] or [Auth0 Community Forums][community-url].\n\n## License\n\nApache 2.0, see [LICENSE](LICENSE).\n\n[npm-image]: https://img.shields.io/npm/v/@oktadev/schematics.svg\n[npm-url]: https://www.npmjs.com/package/@oktadev/schematics\n[github-actions-image]: https://github.com/oktadev/schematics/workflows/Schematics/badge.svg\n[github-actions-url]: https://github.com/oktadev/schematics/actions\n[daviddm-image]: https://david-dm.org/oktadev/schematics.svg?theme=shields.io\n[daviddm-url]: https://david-dm.org/oktadev/schematics\n[devforum-image]: https://img.shields.io/badge/support-developer%20forum-blue.svg\n[devforum-url]: https://devforum.okta.com\n[community-url]: https://community.auth0.com/\n[snyk-url]: https://snyk.io/test/github/oktadev/schematics\n[snyk-image]: https://snyk.io/test/github/oktadev/schematics/badge.svg\n","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foktadev%2Fschematics","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foktadev%2Fschematics","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foktadev%2Fschematics/lists"}