Skip to content

schibsted/sdk-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SDK Example

Build Status

Introduction

This is a demonstration of how a client can use the Schibsted Account login flows. You can see it live at:

The main intention of this code is to have a simplified demo of the most important features of SDK for browsers

How to run it locally?

  1. Clone this repo.
  2. Install dependencies npm run install.
  3. And run npm run dev script.

Configuring the server

  1. You need a few configs obtained from Self-Service in the right environment in order to get started. Set your Identity client credentials in the .env file in the root folder. To get a head start you can just copy a template that's already included in the repo (run: cp .env-example .env and fill in the blanks. Take a look at .env-example to see what is needed.
  2. Then do a source .env && npm start or npm run dev.

Repository structure

For this Example app a simple backend application is exposed.

Backend

The contents for the backend application can be found in the /server directory.

Account-sdk-browser usage

The frontend code is placed in the /public directory, and usage of SDK can be found in index.js.