Socket
Book a DemoInstallSign in
Socket

aos-external

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

aos-external

```js yarn add aos-external ```

1.0.1
latest
npmnpm
Version published
Maintainers
1
Created
Source

Assistants Center Online Services (AOS) Authorization System External Integration

Install

yarn add aos-external

Usage

const express = require('express');
const app = express();

const AOS_External = require('aos-external');
const AOSClient = new AOS_External({
    AXClientID: '',
    AXClientSecret: '',
    AXRedirectURI: 'http://localhost/api/callback',
    // You must be given access to use specific scopes
    AXScopes: ['user.id', 'user.discord', 'user.assistants_username'],
});

app.get('/login', (req,res)=>{
    const AOSUrl = AOSClient.AccessToken();
    console.log(AOSUrl);
    res.redirect(AOSUrl);
})

app.get('/api/callback', async(req,res)=>{
    const User = await AOSClient.AccessUserData(req.query?.access_token);
    console.log(User);
    res.send(User);
    // Will return
    //
    // {
    //    "error":false,
    //    "data":{
    //       "user_assistants_username":"ASSISTANTS USERNAME",
    //       "user_id":"ASSISTANTS_ACCOUNT_UNIQUE_ID",
    //       "user_discord_id":"DISCORD_USER_ID OR NULL"
    //    }
    // }
});

app.listen(80);

Client ID and Secret & Scopes Access

To get access to External Authorization Integration, please contact us via e-mail: support@assistants.ga asking for it and describing your needs.

Scopes available

user.id - User unique Account ID (could not be changed in any way).

user.discord - User Discord account ID connected (can be changed anytime).

user.assistants_username - User AOS Account username (can be changed anytime).

FAQs

Package last updated on 28 Feb 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.