@msg-team/gauth-node
v1.0.9
Published
Created to support GAuth login
Downloads
46
Readme
📚 Description
GAuth
를 더 편하게 이용할 수 있도록 node 버전으로 만들어진 라이브러리입니다.
⚡ Requirements
- axios
🛠️ Installation
// npm
> npm i @msg-team/gauth-node
// yarn
> yarn add @msg-team/gauth-node
🙋 How to use
code 발급
import Gauth from '@msg-team/gauth-node'
const result = await Gauth.issueCode({ email: 's12345', password: '1234' })
// { code: string }
console.log(result)
token 발급
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)
token 재발급
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({
accessToken: 'string',
})
// { accessToken: string, refreshToken: string }
console.log(result)