-
Notifications
You must be signed in to change notification settings - Fork 213
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using social strategies with sessionless jwt strategy #55
Comments
Is this still needed? I am working on an API that does the initial authentication ( log in ) via Github then passes the JWT token to the front-end. On subsequent requests to the api, the front-end passes the JWT to authenticate the user. |
Absolutely a needed thing, I'm done working on my project (sent the JWT to the client-side via query string in the callback url after Instagram authentication, kind of an ugly hack)... |
This can be tricky since a good example would include the backend and a frontend. I currently use AngularJS 1.x as a frontend with the ng-token-auth module. For the backend I use ExpressJS and Sequelize as an ORM. If those requirements are to your satisfaction, I could put something together. |
I'd be interested to see someone's take on this. I've seen various piecemeal articles online. |
I'll slap something together tonight. |
@angelxmoreno - did you manage to figure it out? i'm trying to do something similar for a react app |
I need the same sample which fulfils below requirement. I am using express typescript along with routing-controller module. I have to implement jwt and some of social auth using passport. Is there any samples which handle both email password/ social using passport-jwt authentication ? How can i implement this ? Its really confusing. |
I just ended up hijacking githubStrategy and created jwt for each user through oAuth . https://github.com/Kannaj/42EXP/blob/master/server/passport/passport_github.js#L31 |
Closing as this is out of scope of this module. There have been several answers with examples of social login strategies. @akshath4u There is a good jist in which the author of the passport framework provides his suggestion on how to handle multiple authentication strategies in the same applicaiton: https://gist.github.com/joshbirk/1732068 |
Hi,
I would be greatly helped and appreciative if there were an available example of how to implement jwt and social (in my case, instagram) strategies in a sessionless approach, for an app where routing is being handled by the frontend.
Thanks!
The text was updated successfully, but these errors were encountered: