drupal-auth-client
v0.4.0
Published
Drupal Auth Client
Downloads
337
Readme
Drupal Auth Client
Prerequisites
Make sure your Drupal site is using the simple_oauth Drupal module.
Usage
Importing library
import { drupalAuthClient } from "drupal-auth-client"
Using client_credentials
const client = drupalAuthClient(
"https://drupal.site",
"client_credentials",
{
clientId: "client_id",
clientSecret: "client_secret",
},
)
Using password
const client = drupalAuthClient(
"https://drupal.site",
"password",
{
username: "username",
password: "password",
clientId: "client_id",
clientSecret: "client_secret",
},
)
Supporting organizations
Development sponsored by Octahedroid