Developer Docs for Singpass
  • INTRODUCTION
    • Overview of Singpass
    • Understanding the basics of OIDC
  • GETTING STARTED
    • Onboarding Checklist
    • Understanding the Basics
      • Discovery Endpoint
      • Scopes
      • Setup JSON Web Key Store (JWKS)
      • Configure Singpass Application on SDP (In-Progress)
      • Configure Singpass Application
      • Request for Staging Account and Staging Mobile App
    • Start Integration
    • Custom Integration
      • Demo Application Setup
      • Invoke Authorization Endpoint
      • Setup Client Assertion
      • Invoke Token Endpoint
  • MORE INFOMATION
    • Contact
    • FAQ
Powered by GitBook
On this page
  • Step 1: Clone the Frontend Code of Sample Application
  • Step 2: Navigate to the Project Directory
  • Step 3: Install the Project Dependencies
  • Step 4: Run the React Application
  • Step 6: Clone the Server Side Code of the Sample Application
  • Step 7: Deploy the Sample Application
  • Next steps
  1. GETTING STARTED
  2. Custom Integration

Demo Application Setup

PreviousCustom IntegrationNextInvoke Authorization Endpoint

Last updated 10 months ago

This guide demonstrates how to set up the sample demo Singpass Application built on React framework and Javascript API as server-side code.

To begin the setup, you’ll need to:

Step 1: Clone the Frontend Code of Sample Application

  • In Visual Studio Code, open a new terminal. Clone the Singpass Demo App Frontend repository.

git clone https://github.com/PXNDI/singpass-demo-app.git

Step 2: Navigate to the Project Directory

  • Once the project is created, open the cloned project directory.

Step 3: Install the Project Dependencies

  • Use npm install command to install the project dependencies.

npm install

Step 4: Run the React Application

  • Use npm run start command to run the React application. The application should be loaded up automatically through the web browser http://localhost:3000.com. The demo project calls the token endpoint through an external API hosted on a separate server.

npm run start

Step 6: Clone the Server Side Code of the Sample Application

  • Open a new Visual Studio Code window, then open a new terminal. Clone the Singpass Demo App Sever Side Code repository.

git clone https://github.com/PXNDI/singpassdemoappserver.git

Step 7: Deploy the Sample Application

Next steps

Deploy both the frontend code and server-side code separately to your desired hosting platform. Refer to this on how to deploy a mobile/web application. The sample server-side code is hosted on Netlify as an API function, hence there is a Netlify folder created as per Netlify's requirement. You may need to refer to the documentation of the different hosting providers when deploying your application.

Setup the

If you already have it, proceed to

Node.js and NPM
Visual Studio Code
simple guide
JSON Web Key Store (JWKS)
configure Singpass Application