Ember js torii auth + node backend [Authentication]

248 Views Asked by At

I have used torii auth to get token from facebook/google And this is what gets saved in local storage -

{"authenticator":"simple-auth-authenticator:torii","authorizationCode":"AQBngUP7iiAdRQoPql1_0oTlMHjBehtDkEXYk8M9rRK_1xJ_WBOH99cdjGBZ38uH5sOABn79z3t7qTvWhLrafb_isPsqlxHUdqWKJCKo5UiEbbGmWXDBvc-vRE-QQNN_Vf2oiVFOOHZKCmnL2PZMwat3u8ZvHa35bxIa4qAI3es-dNCi3SLlZ-qWDemA6F5xunYmc6WHBdr4PKyEeXbQWILlZU2OP0ntvbahBDivq1VjECXBa6npdLihX6gnTmSoD5-6Z6xM8x9dw5uKdVDPmSj6k0OfKVXsUU7CXEmko379fslA_jr7c2UIe0Gs1vowGTrGi9fTKayIkl-HhehFlVwT","provider":"facebook-oauth2","redirectUri":"http://localhost:4200/"}

But my node sever is unaware of the communication between my ember app and facebook/google.

I could send the authorizationCode to my node server and then create a token for my ember app.

I want to add one more layer of security and check whether the token received on node is valid.

How do I determine whether the token is a valid token or not ?

0

There are 0 best solutions below