GAuth
를 더 편하게 이용할 수 있도록 node 버전으로 만들어진 라이브러리입니다.
- axios
// npm
> npm i @msg-team/gauth-node
// yarn
> yarn add @msg-team/gauth-node
import Gauth from '@msg-team/gauth-node'
const result = await Gauth.issueCode({
email: 's12345', // s12345 or s12345@gsm.hs.kr
password: '1234',
})
// { code: string }
console.log(result)
import Gauth from '@msg-team/gauth-node'
const result = await Gauth.issueToken({
code: 'string',
clientId: 'string',
redirectUri: 'string',
clientSecret: 'string',
})
// { accessToken: string, refreshToken: string }
console.log(result)
import Gauth from '@msg-team/gauth-node'
const result = await Gauth.reissueToken({
refreshToken: 'string',
})
// { accessToken: string, refreshToken: string }
console.log(result)
import Gauth from '@msg-team/gauth-node'
const result = await Gauth.getUser({
Authorization: 'string',
})
// { accessToken: string, refreshToken: string }
console.log(result)