- Notifications
You must be signed in to change notification settings - Fork9
🔀🔒 Helpful authentication routes for Node.js GitHub integrations
License
NotificationsYou must be signed in to change notification settings
probot/auth-routes
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Helpful authentication routes for Node.js GitHub integrations
$ npm install auth-routes
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,});
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,});};
Name | Description | Required | Default |
---|---|---|---|
client_id | GitHub App's Client ID | ✓ | - |
client_secret | GitHub App's Client Secret | ✓ | - |
loginURL | Login path | '/login' | |
callbackURL | Authorization callback URL, for your GitHub App | '/login/cb' | |
afterLogin | Where 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
Packages0
No packages published