https://github.com/toktokhan-dev/0auth-sdk
Client Side JavaScript toolkit for 0Auth.
https://github.com/toktokhan-dev/0auth-sdk
auth authentication authorization javascript jwt login oauth2 sdk typescript
Last synced: 9 days ago
JSON representation
Client Side JavaScript toolkit for 0Auth.
- Host: GitHub
- URL: https://github.com/toktokhan-dev/0auth-sdk
- Owner: TOKTOKHAN-DEV
- License: mit
- Created: 2021-11-16T11:04:48.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-12-30T10:34:40.000Z (over 4 years ago)
- Last Synced: 2025-02-26T03:02:32.432Z (over 1 year ago)
- Topics: auth, authentication, authorization, javascript, jwt, login, oauth2, sdk, typescript
- Language: TypeScript
- Homepage: https://landing.0auth.kr
- Size: 160 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: changelog.config.js
- License: LICENSE
Awesome Lists containing this project
README
# 0auth-sdk
[](https://www.npmjs.com/package/0auth-sdk)
[](https://www.npmjs.com/package/0auth-sdk)
[](https://www.npmjs.com/package/0auth-sdk)
[](https://www.npmjs.com/package/0auth-sdk)
Client Side JavaScript toolkit for 0Auth.
## Installation
With [npm](https://www.npmjs.com/):
```bash
npm install 0auth-sdk
```
With [yarn](https://yarnpkg.com/):
```bash
yarn add 0auth-sdk
```
## Usage
### With react
Initializing
```js
import Auth from '0auth-sdk';
Auth.initialize({
brand: 'test'
});
```
options | type | require | description
--------|--------|----------------------------|-----
brand | string | true | set login page link as [brand].0auth.kr
getOptions
```js
Auth.getOptions()
```
login
```js
// if initialized, push to 0auth login page
Auth.login()
```
getProfile
```js
// if access token is verified
Auth.getProfile()
```