sahat / satellizer

Token-based AngularJS Authentication
https://satellizer-sahat.rhcloud.com
MIT License
7.85k stars 1.13k forks source link

Facebook, getting user data to local storage #528

Open fligen opened 9 years ago

fligen commented 9 years ago

Im having an issue getting the facebook user data to local storage, every thing else seems to be working , it will create a user in my DB and add the token to local storage bot for the life of my cant get the user data to populate. Any help with this is appreciated.

Digging into this a little more it seems the token that is generated is invalid, but only with facebook.

leonaburime commented 9 years ago

Hi fligen, I think I am getting the same thing where the token being created for facebook is one long string with no periods to break it up into a payload. Have you found anything out or resolved this issue?

jlien-calwater commented 9 years ago

@fligen once you have user created in DB, you will need to generate a JWT token from the newly created user, e.g., the token created from FB will not work for your application so you will need to generate a token from the User model that you have created.

See: https://github.com/tymondesigns/jwt-auth/wiki/Creating-Tokens#creating-a-token-based-on-a-user-object