daisyconbv / oauth-examples
A list of Daisycon oAuth examples.
Installs: 492
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 4
Forks: 3
Open Issues: 0
pkg:composer/daisyconbv/oauth-examples
Requires
- php: >=7.4
This package is not auto-updated.
Last update: 2026-01-04 03:08:56 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