npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

dankook-student-council-login

v1.0.7

Published

단국대학교 총학생회 로그인 모듈

Downloads

9

Readme

dankook-student-council-login

단국대학교 총학생회 로그인 컴포넌트

Getting Started

Installation

  • NPM
npm install dankook-student-council-login
  • Yarn
yarn add dankook-student-council-login

Environment

  • React

Usage

  • React
import DankookStudentCouncilLogin from "dankook-student-council-login";

<DankookStudentCouncilLogin
  clientId={clientId}
  redirectUri={redirectUri}
  onSuccess={onSuccess}
/>;
  • Next.js ssr 환경에서 동작하지 않으므로 동적 import가 필요합니다.

const DankookStudentCouncilLogin = dynamic(
  () => import("dankook-student-council-login"),
  {
    ssr: false,
  }
);

<DankookStudentCouncilLogin
    ...
/>

Property

| name | type | description | note | | ----------- | ------------- | ----------------------------------------------------- | ----------------------------------- | | clientId | string | OAuth 사용 허가를 위한 클라이언트 ID | 개발자에 문의하여 발급 | | redirectUri | string | 로그인 성공 시 리다이렉트 될 URI | 해당 컴포넌트가 작성된 URI | | style? | CSSProperties | 로그인 버튼 스타일을 덮어쓰는 오브젝트 | | | onSuccess | Function | 리다이렉트 이후 authCode를 파라미터로 가져오는 메서드 | | | onError? | Function | 로그인 실패 시 에러 핸들링을 구현하는 메서드 | |

토큰 발급 플로우

onSuccess

로그인 성공 시 authCode와 codeVerifier가 onSuccess의 인자로 반환되며, 이를 사용해서 Access Token과 Refresh Token을 발급받습니다.

interface AuthorizeResponse {
  authCode: string;
  codeVerifier: string;
}

const onSuccess = (res: AuthorizeResponse) => {
  getToken(res);
};

토큰 발급 API

POST https://danvery.com/api/oauth/token

  • Parameters

    | name | type | note | | ------------ | ------ | -------------------------------------- | | grantType | string | authorization code 사용 | | clientId | string | 개발자에 문의하여 발급 | | clientSecret | string | 개발자에 문의하여 발급 | | redirectUri | string | | | code | string | onSuccess의 인자로 받은 authCode | | codeVerifier | string | onSuccess의 인자로 받은 codeVerifier |

  • Responses

    | code | response key | response type | | ---- | ------------ | ------------- | | 200 | accessToken | string | | | refreshToken | string | | | tokenType | string | | | scope | string |