sibartlett / hapi-io

Awesome socket.io plugin for hapi
MIT License
105 stars 18 forks source link

bell authentication example #5

Open kevindeasis opened 9 years ago

kevindeasis commented 9 years ago

Im trying to use bell and facebook for authentication, can you please give an example; I cant seem to get it to work properly

sibartlett commented 9 years ago

I've just taken a look at bell, they recommend using it with the hapi-auth-cookie plugin.

Once the [bell] handler is called, the application must set its own session management. A common solution is to combine bell with the hapi-auth-cookie authentication scheme plugin.

In this case, only the facebook login endpoint would use the bell plugin, the rest of your application would then use the hapi-auth-cookie plugin. hapi-io can then use the cookie to authenticate the user.

kevindeasis commented 9 years ago

Thanks, it works beautifully!