• Overview
    • Authentication Service
    • Token Service
    • User Management Service
    • Configuration
    • Deployment
    • Conformance
    • Monitoring and Metrics
    • Alarms
    • Plans & pricing
    • Common Identity Platform
    • Identity for Government Solutions
    • Modernizing Infrastructure
    • Open Banking & Financial-Grade APIs
    • Protecting Health Care
    • Secure Financial Services
    • Secure Frictionless Authentication
    • Tech and SaaS Security
    • Zero Trust and Security Architecture
    • Resource Library
    • Getting Started
    • Articles
    • How-tos
    • Guides
    • Code Examples
    • Webinars
    • Documents
    • Videos
    • Courses
    • About
    • Customers
    • Partners
    • Careers
    • Events Calendar
    • Press
    • News
    • Blog
    • Developer Portal
    • Releases
    • Documentation
    • Libraries & SDKs
    • OAuth Tools
    • Ticket-based Support
    • Instant Message Support
    • Professional Services
    • Training
  • Contact
  • Search
NewsCurity Identity Server 8.1 is Out - Learn What's New!
Curity logo
  • Contact
  • Search
  • Schedule a Demo
  • Start Free Trial
ArticlesGetting StartedHow-tosGuidesCode ExamplesDocumentationVideosWebinarsCoursesDocuments
What's newRSS

Code ExamplesCode Examples

  • APIs
    • Securing a Spring Boot API with JWTs
    • Securing a Java API with JWTs
    • Securing a Kotlin API with JWTs
    • Securing a .NET API with JWTs
    • Securing a Go API With JWTs
    • Securing a Node.js Express API with JWTs
    • Securing a Python Flask API with JWTs
    • Securing a Symfony API with JWTs
    • Securing a Serverless API with JWTs
    • Securing a Serverless API on Vercel using JWTs
    • Mutual TLS Secured API
    • API Access via JWT Assertions
    • Securing API Events using JWTs
    Single Page Apps
    • SPA using the Token Handler Pattern
    • Token Handler Deployment Example
    • Node.js OAuth Agent
    • Kotlin OAuth Agent
    • .NET OAuth Agent
    • Next.js OAuth Agent
    • Financial-Grade OAuth Agent
    • Javascript SPA using Assisted Token Flow
    • Javascript SPA using OAuth Assistant Library
    • Javascript SPA using Code Flow + PKCE
    • React SPA using Assisted Token Flow
    • Angular SPA using Assisted Token Flow
    Websites
    • OpenID Connect Client with Spring Security
    • OpenID Connect Client with .NET
    • OpenID Connect Client with .NET Framework
    • OpenID Connect Client with Node.js Express
    • OpenID Connect Client with Python
    • OpenID Connect Client with Java Undertow
    • Website with Encrypted ID Tokens
    Mobile Apps
    • Swift iOS App using AppAuth
    • Swift iOS App using HAAPI
    • Kotlin Android App using AppAuth
    • Kotlin Android App using HAAPI
    • Mobile Dynamic Client Registration
    • Mobile Web SSO
    Integrating an API Gateway
    • NGINX Phantom Token Module
    • NGINX OAuth Proxy Module
    • NGINX Lua OAuth Proxy Plugin
    • Cloudflare Worker OAuth Proxy Module
    • AWS API Gateway OAuth Proxy Module
    • Azure API Management OAuth Proxy Policy
    • Open Banking Brazil DCR Request Validation in Nginx
    Integrating the Hypermedia Authentication API
    • Hypermedia Authentication API React Demo

Plugins

  • Alarm Handlers
    • Alarm Integration Plug-in
    Authenticators
    • BehavioSec Authenticator
    • Bitbucket Authenticator
    • Box Authenticator
    • Criipto Authenticator
    • Dropbox Authenticator
    • Entrust Authenticator
    • Freja eID Authenticator
    • GitHub Authenticator
    • Instagram Authenticator
    • LinkedIn Authenticator
    • Nonce Authenticator
    • reCAPTCHA Authenticator
    • Salesforce Authenticator
    • Slack Authenticator
    • StackExchange Authenticator
    • Twitter Authenticator
    • Username Password Authenticator
    • Windows Live Authenticator
    Authentication Actions
    • Debug Attribute Authentication Action
    • Redirect Action Example
    • Send Email Action Example
    • Time Based Deny Authentication Action
    • Kong Dev Portal User Provisioner
    • Azure API Management User Provisioner
    Data Access
    • PBKDF2 Credential Data Access Plugin
    • MongoDB Data Access Plugin
    • RESTful Data Access Plugin
    Claims Providers
    • Salesforce Claims Provider
    Consentors
    • Example Generic Consentor
    Emailers
    • RESTful Emailer Plug-in
    • Twilio SendGrid Emailer Plugin
    Event Listeners
    • Amazon SQS Event Listener
    • Apigee Token Publisher Event Listener
    • Apigee Split Token Publisher Event Listener
    • AWS Split Token Publisher Event Listener
    • Client Authentication Attempt Counter
    • Cloudflare Token Publisher Event Listener
    SMS Senders
    • RESTful SMS Sender Plugin
    • Tele2 SMS Plugin
    Authorization Managers
    • XACML Authorization Manager
    • Open Policy Agent Authorization Manager
    Token Procedures
    • Long-Lived Tokens on Refresh Procedure Plugin

Learn more

  • Webinars
  • Documents
  • Videos
Single Page Apps

Single Page Apps

Code examples for creating OAuth clients for Single Page Applications, the token handler pattern, OAuth Agent, Assisted Token Flow and more.

SPA using the Token Handler Pattern

SPA using the Token Handler Pattern

An example showing how to use the Token Handler Pattern in an SPA

Token Handler Deployment Example

Token Handler Deployment Example

Details of how the code example and its token handler is deployed

Node.js OAuth Agent

Node.js OAuth Agent

A Node.js and Express OAuth Agent that enables strong browser security for SPAs

Kotlin OAuth Agent

Kotlin OAuth Agent

A Kotlin OAuth Agent that enables strong browser security for SPAs

.NET OAuth Agent

.NET OAuth Agent

A .NET OAuth Agent that enables strong browser security for SPAs

Next.js OAuth Agent

Next.js OAuth Agent

An OAuth Agent that enables strong browser security for SPAs, implemented using Next.js

Financial-Grade OAuth Agent

Financial-Grade OAuth Agent

An OAuth Agent that enables financial-grade security for SPAs

Javascript SPA using Assisted Token Flow

Javascript SPA using Assisted Token Flow

An example that uses the assisted token flow in a simple Javascript app.

Javascript SPA using OAuth Assistant Library

Javascript SPA using OAuth Assistant Library

How to use the Curity OAuth Assistant available on npm in a Single Page Application

Javascript SPA using Code Flow + PKCE

Javascript SPA using Code Flow + PKCE

A simple Javascript SPA sample using the code flow with PKCE

React SPA using Assisted Token Flow

React SPA using Assisted Token Flow

An example that uses the assisted token flow in a React JS app.

Angular SPA using Assisted Token Flow

Angular SPA using Assisted Token Flow

An example that uses the assisted token flow in an Angular app.

Curity logo

info@curity.io

Get in touch

  • Nordic APIs
  • Nordic APIs
  • Nordic APIs
  • Nordic APIs
  • Nordic APIs
  • Pitchbook
  • Medium
  • Nordic APIs

Sign up for API Security Insights.

© Curity AB Terms of Service

Product

  • Product Overview
  • Authentication Service
  • Token Service
  • User Management Service
  • Community Edition
  • Product Plans
  • FAQ
  • Support

Solutions

  • Common Identity Platform
  • Modernizing Infrastructure
  • Open Banking & Financial-Grade APIs
  • Secure Frictionless Authentication
  • Zero Trust and Security Architecture
  • Financial Services
  • Government
  • Healthcare
  • Technology / SaaS

Resources

  • Resource Library
  • What's New
  • Articles
  • Getting Started
  • How-tos
  • Code Examples
  • Webinars
  • Whitepapers
  • Documents
  • Videos
  • Courses
  • OAuth Tools

Company

  • About
  • Customers
  • Partners
  • Careers
  • Events Calendar
  • Press
  • News
  • Blog
  • Investor Relations