Skip to content

A sample JavaScript SPA integrated with WSO2 Identity Server for authentication, contribution for the WSO2 Customer Success Internship application.

Notifications You must be signed in to change notification settings

SASAXE/wso2-js-sample-project

Repository files navigation

WSO2 Internship Contribution: 2-Point Project

This repository documents my successful completion of a 2-point project, submitted as part of my application for the WSO2 Customer Success Internship.

  • Applicant: Sasanka Hemakumara
  • Date: November 1, 2025
  • Task: Use a WSO2 product in a real-world project or solution.

Project Summary

The goal of this project was to deploy a local instance of the WSO2 Identity Server (v7.2.0) and integrate it with the official Asgardeo JavaScript SPA sample application.

This demonstrates a real-world use case of WSO2 IS providing OpenID Connect (OIDC) authentication for a modern, single-page web application.

Technology Used

  • WSO2 Identity Server (v7.2.0)
  • Asgardeo HTML/JS SPA Sample Project
  • Node.js (for running the npm commands)
  • http-server (to serve the sample application)

Steps Completed

  1. Server Setup: Downloaded and successfully ran the WSO2 Identity Server (wso2is-7.2.0) locally.
  2. Application Registration: Created a new "Single-Page Application" in the WSO2 Console.
  3. Configuration:
    • Configured the "Authorized redirect URL" in the WSO2 Console to https://localhost:3000.
    • Copied the generated Client ID.
    • Edited the sample app's index.html file to include this Client ID and the baseUrl (https://localhost:9443).
  4. App Deployment: Started the JavaScript SPA on https://localhost:3000 using the npx http-server -p 3000 -S -a localhost command.
  5. Authentication: Successfully tested the complete authentication flow.

Evidence of Completion

1. The Application (Before Login)

The sample application is running successfully on https://localhost:3000, displaying the "Login" button.

Screenshot 2025-11-01 223017

2. The Authentication (Login Redirect)

Clicking "Login" correctly redirects to the WSO2 Identity Server's login page, which is running on https://localhost:9443. Screenshot 2025-11-01 223329

3. The Result (Successful Login)

After entering the correct admin/admin credentials, the server authenticates the user and redirects back to the application. The app now displays the "Authentication Response" and the user's details, confirming a successful integration. Screenshot 2025-11-01 231117 image

About

A sample JavaScript SPA integrated with WSO2 Identity Server for authentication, contribution for the WSO2 Customer Success Internship application.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published