Skip to content

Added few more options to get tokens from request from the original.

Notifications You must be signed in to change notification settings

tresdev/passport-kakao-token

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

passport-kakao-token2

This module provides to authenticate with an access token on connect middleware including express.js. It will be necessary to login on the Device.

It forked from passport-kakao-token to send tokens as HTTP header or HTTP body.

Installation

npm install passport-kakao-token2

How to Use

You can authenticate with calling REST API like below.

Sending access token as query parameter

GET /auth/kakao/token?access_token=[ACCESS_TOKEN]

Sending access token in HTTP body

POST /resource HTTP/1.1
Host: server.example.com

access_token=[ACCESS_TOKEN]

Sending access token as HTTP header

GET /auth/kakao/token
Authorization: Bearer [ACCESS_TOKEN]

And you should define a routing on your connect-style codes.

app.get('/auth/kakao/token', passport.authenticate('kakao-token'), function (req, res) {
    if (req.user) {
        // success
    } else {
        // fail
    }
});

About

Added few more options to get tokens from request from the original.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%