PassportJS integrated with Railway
PassportJS auth library integrated into RailwayJS. Why this package needed? To be honest, PassportJS is dead-simple in integrating. But it can be simplier. This package for authentication without extra coding, just configure it and use
var rwps = ;app;
Please not that order of middlewares is important!
rwps.init(); should go right before app.router middleware.
development:baseURL: ''google: yesgithub:clientID: "a8578b8dc47834908338"secret: "d8107d7cd75fc8ee1f12cf1f38b3aa065c3ec2ac"linkedin:apiKey: "3s708f1uys4x"secret: "p3iBqlybJ5WNTINv"production:baseURL: ''github:clientID: "...."secret: "...."
All authentication routes starts with
/auth/google to sign in with google:
<% link_to('Sign in with google', '/auth/google') %> <% link_to('Sign in with linkedin', '/auth/linkedin') %> <% link_to('Sign in with github', '/auth/github') %>
Example before filter (describe in your application controller):