0 auth-sdk
客户端JavaScript工具包。
安装
与 npm:
npm install 0auth-sdk
与 纱:
yarn add 0auth-sdk
使用
与反应
初始化
import Auth from '0auth-sdk';
Auth.initialize({
brand: 'test'
});
| 选项 | 类型 | 需要 | 描述 |
|---|---|---|---|
| 品牌 | 字符串 | 真正的 | 登录页面链接设置为[brand].0auth.kr |
getOptions
Auth.getOptions()
登录
// if initialized, push to 0auth login page
Auth.login()
getProfile
// if access token is verified
Auth.getProfile()