← Back to list

Building a Secure React + TypeScript + iTwin.js SPA with CRA

Setting up a new React app with create-react-app (CRA) can be challenging due to errors or excessive boilerplate from existing templates…

Asad Bukhari · 2025-03-07 05:50 · 0 claps · 0.9 min read
#itwinjs #itwin-platform #create-react-app #authentication
Open on Medium ↗
Wiki topics: 🌐 · Web Development

Building a Secure React + TypeScript + iTwin.js SPA with CRA

Setting up a new React app with create-react-app (CRA) can be challenging due to errors or excessive boilerplate from existing templates. The itwin-auth-spa template simplifies this by generating a minimal, well-structured setup for integrating authentication with iTwin.js.

With this guide, you’ll quickly scaffold a secure React application using TypeScript, CRA, and iTwin.js authentication.

Prerequisites

Before getting started, make sure you have:

Step 1: Create a New iTwin.js SPA with Authentication

Run the following command to set up a React app with TypeScript, iTwin.js, and authentication:

npx create-react-app my-itwin-app --template itwin-auth-spa

This command does the following:

  • Sets up a React app with TypeScript and iTwin.js authentication enabled.
  • Installs the necessary dependencies.
  • Provides a minimal starting template to start with iTwin.js Application.

Step 2: Build and Run the App

To build and start the app, run:

npm run build
npm start

Conclusion

By following these steps, you’ve created a secure React + TypeScript SPA with iTwin.js authentication. This setup provides a scalable foundation for integrating authentication while keeping the codebase clean and manageable.


메타데이터
post_id
0e2d5dfd6d7f
slug
building-a-secure-react-typescript-itwin-js-spa-with-cra-0e2d5dfd6d7f
url
https://medium.com/@asad_bukhari/building-a-secure-react-typescript-itwin-js-spa-with-cra-0e2d5dfd6d7f
canonical_url
https://medium.com/@asad_bukhari/building-a-secure-react-typescript-itwin-js-spa-with-cra-0e2d5dfd6d7f
author_url
https://medium.com/@asad_bukhari
status
ok
fetched_at
2026-07-13 06:23:13