Socket
Socket
Sign inDemoInstall

aos-external

Package Overview
Dependencies
4
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    aos-external

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


Version published
Weekly downloads
1
Maintainers
1
Install size
473 kB
Created
Weekly downloads
 

Readme

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

Last updated on 28 Feb 2022

Did you know?

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

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc