Skip to content

MDEV-DGSW/Dodam-OpenAPI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dodam-OpenAPI

A npm package for easy use of DodamDodam OAuth

Installing

Use npm
$ npm install @b1nd/openapi

Use yarn
$ yarn add @b1nd/openapi

How to use

create module

const clientId: string = "clientId";
const clientSecret: string = "clientSecret";

const authClient = new AuthClient(clientId, clientSecret);

Login

const code: string = "code";

const token = await AuthClient.login(code);

Get token

const code: string = "code";

const token = await AuthClient.getToken(code);

Refresh token

const refreshToken: string = "refresh_token";

const token = await AuthClient.refreshToken(refreshToken);

Get user

const token: string = "access_token";

const user = await AuthClient.getUser(token);

Read More

DAuth | DAuth-Docs