Passport JS integration


#1

Can anyone tell me how can passport js be integreated using adonis js, is it the same as socket .io? since using express you need to set the session and initialize using app.use(passport.initialize()) and app.use(passport.session()). Thank you!


#2

I recommend you to read docs, there is inbuilt support for social authentication http://adonisjs.com/docs/4.0/social-auth#sponsor

Advice: Try to go through docs, and Adonis is completely different from express


#3

Yes I am aware, I’m using adonis since it’s great for building large marketplace websites like laravel does. But I’m trying to login with steam OpenID which strategy is available through passport.


#4

I believe I can add support for Open Id inside ally. PassportJs is too verbose to be used inside a conventional framework.


#5

That would be great since logging inside open ID can be quite crud if done manually


#6

One more question does every script on the folder start ran on startup?


#7

Nope, there are some special files like start/app.js and start/routes.js, that ignitor loads. Rest you can tell ignitor to preload files for you, or use hooks, if you want to run some code at a special event.

http://adonisjs.com/docs/4.0/ignitor#_hooks

http://adonisjs.com/docs/4.0/ignitor#_preloading_files


#8

Hi @virk,

If I want manage Facebook page, how I can make this?

Thanks.


#9

https://adonisjs.com/docs/4.1/social-auth