daisyconbv/oauth-examples

There is no license information available for the latest version (v1.0.0) of this package.

A list of Daisycon oAuth examples.

v1.0.0 2023-03-03 12:36 UTC

This package is not auto-updated.

Last update: 2025-07-05 23:56:46 UTC


README

This repository contains small example scripts for oAuth usage.

Javascript/Typescript

Note: both javascript and typescript examples assume you use a compiler like webpack

We also have an oauth client package available with cli support https://github.com/DaisyconBV/js-oauth-client

PHP

Even though you can see our examples here, we recommend you use the PHP League oAuth Client https://github.com/thephpleague/oauth2-client

For CLI there is a CLI client available.

Usage

php PHP/cli-client.php --clientId CLIENT_ID --clientSecret CLIENT_SECRET --outputFile tokens.json

You can then use the tokens in your code and refresh them using your own code

PowerShell

This is a small example for making an api call using OAuth in PowerShell.

Install-module -name PKCE
Install-Module -name JWTDetails
Add-Type -AssemblyName System.Web

Usage:

.\PowerShell\example.ps1