Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

🔀🔒 Helpful authentication routes for Node.js GitHub integrations

License

NotificationsYou must be signed in to change notification settings

probot/auth-routes

Repository files navigation

Helpful authentication routes for Node.js GitHub integrations

NPMBuild StatusCodecov

Install

$ npm install auth-routes

Usage

const{ registerAuthRoutes}=require("auth-routes");constapp=express();registerAuthRoutes(app,{client_id:process.env.GITHUB_CLIENT_ID,client_secret:process.env.GITHUB_CLIENT_SECRET,});// Or pass some options:registerAuthRoutes(app,{loginURL:"/log-me-in",callbackURL:"/call-me-back",client_id:process.env.GITHUB_CLIENT_ID,client_secret:process.env.GITHUB_CLIENT_SECRET,});

Use with Probot

module.exports=(app)=>{// Access the Express server that Probot usesconstexpressApp=app.route();// Register the routes as normalregisterAuthRoutes(expressApp,{client_id:process.env.GITHUB_CLIENT_ID,client_secret:process.env.GITHUB_CLIENT_SECRET,});};

Options

NameDescriptionRequiredDefault
client_idGitHub App's Client ID-
client_secretGitHub App's Client Secret-
loginURLLogin path'/login'
callbackURLAuthorization callback URL, for your GitHub App'/login/cb'
afterLoginWhere users are redirected to after they've logged in'/'

About

🔀🔒 Helpful authentication routes for Node.js GitHub integrations

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp