A npm package for easy use of DodamDodam OAuth
Use npm
$ npm install @b1nd/openapi
Use yarn
$ yarn add @b1nd/openapi
create module
const clientId: string = "clientId";
const clientSecret: string = "clientSecret";
const authClient = new AuthClient(clientId, clientSecret);
const code: string = "code";
const token = await AuthClient.login(code);
const code: string = "code";
const token = await AuthClient.getToken(code);
const refreshToken: string = "refresh_token";
const token = await AuthClient.refreshToken(refreshToken);
const token: string = "access_token";
const user = await AuthClient.getUser(token);