Unfurl-Connect Docs
  • Overview
  • Guides
    • Quickstart
    • Easy Integration
      • Browser Only
      • Client Server
      • Cloud Services
        • Google Cloud Platform
        • Amazon Web Services
      • Mobile
        • Android
        • iOS
    • Branding
    • Self-hosting the IdP
    • Advanced Configuration
  • Extras
    • Roadmap
    • Projects
Powered by GitBook
On this page

Was this helpful?

  1. Guides
  2. Easy Integration

Client Server

PreviousBrowser OnlyNextCloud Services

Last updated 3 years ago

Was this helpful?

Although not necessary, authentication and authorization are typically done between client and server. Here we look at ways clients can use Unfurl in this way.

Node.js

const { auth } = require('express-openid-connect');
app.use(
  auth({
    issuerBaseURL: 'https://auth.unfurl-connect.com',
    baseURL: 'https://YOUR_APPLICATION_ROOT_URL',
    clientID: 'YOUR_CLIENT_ID',
    secret: '***********************',
    response_type: 'code',
    response_mode: 'form_post',
    scope: 'openid offline_access roles',
    claims: {
      id_token: {"roles": { "essential" : true } }
    }
  })
);

There is no client code. Logging in is done by navigating the user to /login.

A full example can be found .

express-openid-connect.js
here